summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-10-28 23:21:46 -0700
committerH. Peter Anvin <hpa@zytor.com>2007-10-28 23:21:46 -0700
commitb0c546269408e0ea7df4a6b6d9b1dc7a294e7307 (patch)
tree4175e23405a5f450cfbb009c71ae7e19d44a8794
parentff9e7e34a10f5d4a44bf1baf08929f9c4c4cf13e (diff)
downloadnasm-b0c546269408e0ea7df4a6b6d9b1dc7a294e7307.tar.gz
nasm-b0c546269408e0ea7df4a6b6d9b1dc7a294e7307.tar.bz2
nasm-b0c546269408e0ea7df4a6b6d9b1dc7a294e7307.zip
Fix bogus flagging of effective addresses as invalid
Ah, what a difference a single ~ makes... such as flagging invalid EAs as valid and vice versa.
-rw-r--r--assemble.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/assemble.c b/assemble.c
index 83a9a8a..18cc7cf 100644
--- a/assemble.c
+++ b/assemble.c
@@ -1931,7 +1931,7 @@ static ea *process_ea(operand * input, ea * output, int bits,
ix = 0;
}
- if (b != -1 && b >= EXPR_REG_START && b < REG_ENUM_LIMIT) {
+ if (b >= EXPR_REG_START && b < REG_ENUM_LIMIT) {
bt = regvals[b];
bx = reg_flags[b];
} else {
@@ -1957,7 +1957,7 @@ static ea *process_ea(operand * input, ea * output, int bits,
return NULL; /* Invalid register */
if (~sok & bx & SIZE_MASK)
return NULL; /* Invalid size */
- sok &= ~bx;
+ sok &= bx;
}
/* While we're here, ensure the user didn't specify