mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-11-21 03:14:19 +08:00
9f8171317d
When there is an immediate in the instruction, a RIP-relative offset may not be relative to the end of the offset itself, since it is relative to the end of the *instruction*, not the end of the *offset*. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 lines
303 B
NASM
12 lines
303 B
NASM
;Testname=unoptimized; Arguments=-fbin -oriprel2.bin -O0; Files=stdout stderr riprel.bin
|
|
;Testname=optimized; Arguments=-fbin -oriprel2.bin -Ox; Files=stdout stderr riprel.bin
|
|
|
|
bits 64
|
|
|
|
default rel
|
|
mov dword [foo],12345678h
|
|
mov qword [foo],12345678h
|
|
mov [foo],rax
|
|
mov dword [foo],12345678h
|
|
foo:
|