forked from Mirrors/tinycc
x86-asm: Accept all 32bit immediates
In particular don't care if they're signed or unsigned, they're all acceptable as immediates.master
parent
372f4b6a4e
commit
e7ef087598
|
@ -423,7 +423,7 @@ static void parse_operand(TCCState *s1, Operand *op)
|
||||||
if (op->e.v == (uint16_t)op->e.v)
|
if (op->e.v == (uint16_t)op->e.v)
|
||||||
op->type |= OP_IM16;
|
op->type |= OP_IM16;
|
||||||
#ifdef TCC_TARGET_X86_64
|
#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;
|
op->type = OP_IM64;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,6 +49,8 @@ movw %ax, 0x100(%ebx,%edx,2)
|
||||||
|
|
||||||
movw $0x1122,%si
|
movw $0x1122,%si
|
||||||
movl $0x112233,%edx
|
movl $0x112233,%edx
|
||||||
|
movl $0x80000000, %esi
|
||||||
|
movl $-0x7fffffff, %edi
|
||||||
#ifdef __x86_64__
|
#ifdef __x86_64__
|
||||||
mov $0x11223344,%rbx
|
mov $0x11223344,%rbx
|
||||||
movq $0x11223344,%rbx
|
movq $0x11223344,%rbx
|
||||||
|
|
Loading…
Reference in New Issue