summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2002-05-11 04:01:26 +0000
committerH. Peter Anvin <hpa@zytor.com>2002-05-11 04:01:26 +0000
commit87e1fcdab9501035d3d2642938d9e32b36e5ab06 (patch)
tree77cf88fa4e0eafa65fc5c7fb7f92d20852e30afd
parent08b4beecb2e60ea2282d320a9a06e170b84b62ce (diff)
downloadnasm-87e1fcdab9501035d3d2642938d9e32b36e5ab06.tar.gz
nasm-87e1fcdab9501035d3d2642938d9e32b36e5ab06.tar.bz2
nasm-87e1fcdab9501035d3d2642938d9e32b36e5ab06.zip
Fix sequence point problem.
-rw-r--r--assemble.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/assemble.c b/assemble.c
index ff308f6..b8eac2c 100644
--- a/assemble.c
+++ b/assemble.c
@@ -1390,14 +1390,15 @@ static ea *process_ea (operand *input, ea *output, int addrbits, int rfield,
return NULL;
if (s!=1 && i!=-1) return NULL;/* no can do, in 16-bit EA */
- if (b==-1 && i!=-1) b ^= i ^= b ^= i; /* swap them round */
+ if (b==-1 && i!=-1) { int tmp = b; b = i; i = tmp; } /* swap */
if ((b==R_SI || b==R_DI) && i!=-1)
- b ^= i ^= b ^= i; /* have BX/BP as base, SI/DI index */
+ { int tmp = b; b = i; i = tmp; }
+ /* have BX/BP as base, SI/DI index */
if (b==i) return NULL;/* shouldn't ever happen, in theory */
if (i!=-1 && b!=-1 &&
(i==R_BP || i==R_BX || b==R_SI || b==R_DI))
return NULL; /* invalid combinations */
- if (b==-1) /* pure offset: handled above */
+ if (b==-1) /* pure offset: handled above */
return NULL; /* so if it gets to here, panic! */
rm = -1;