aboutsummaryrefslogtreecommitdiff
path: root/i386-asm.c
diff options
context:
space:
mode:
authorMichael Matz <matz@suse.de>2016-08-24 17:50:23 +0200
committerMichael Matz <matz@suse.de>2016-12-15 17:47:11 +0100
commite7ef087598d74e3329a7f0b24af8430faf639606 (patch)
tree7010bf606d47134e94dc0b51eb51353a2cad67c3 /i386-asm.c
parent372f4b6a4ecca33191159328989dbd16d5fcc527 (diff)
downloadtinycc-e7ef087598d74e3329a7f0b24af8430faf639606.tar.gz
tinycc-e7ef087598d74e3329a7f0b24af8430faf639606.tar.bz2
x86-asm: Accept all 32bit immediates
In particular don't care if they're signed or unsigned, they're all acceptable as immediates.
Diffstat (limited to 'i386-asm.c')
-rw-r--r--i386-asm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/i386-asm.c b/i386-asm.c
index 3d87e92..473088b 100644
--- a/i386-asm.c
+++ b/i386-asm.c
@@ -423,7 +423,7 @@ static void parse_operand(TCCState *s1, Operand *op)
if (op->e.v == (uint16_t)op->e.v)
op->type |= OP_IM16;
#ifdef TCC_TARGET_X86_64
- if (op->e.v != (int32_t)op->e.v)
+ if (op->e.v != (int32_t)op->e.v && op->e.v != (uint32_t)op->e.v)
op->type = OP_IM64;
#endif
}