mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-01-06 16:04:43 +08:00
b3cee5a57a
The implicit operand size override code didn't set the operand size prefix, which confused the size calculation code for the range check. The BITS 64 operand size calculation is still off, but "fixing" it by making it 32-bit unless REX.W is set breaks PUSH and maybe others.
15 lines
363 B
NASM
15 lines
363 B
NASM
;Testname=unoptimized; Arguments=-O0 -fbin -obr3058845.bin; Files=stdout stderr br3058845.bin
|
|
;Testname=optimized; Arguments=-Ox -fbin -obr3058845.bin; Files=stdout stderr br3058845.bin
|
|
|
|
BITS 16
|
|
cmp ax, 0xFFFF
|
|
cmp eax, 0xFFFF_FFFF
|
|
|
|
BITS 32
|
|
cmp ax, 0xFFFF
|
|
cmp eax, 0xFFFF_FFFF
|
|
|
|
BITS 64
|
|
cmp ax, 0xFFFF
|
|
cmp eax, 0xFFFF_FFFF ; shouldn't warn, but does currently
|