nasm/test/riprel2.asm
H. Peter Anvin 9f8171317d BR 2148448: Fix RIP-relative addressing with an immediate
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>
2008-10-06 19:11:07 -07:00

11 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: