]> granicus.if.org Git - yasm/commit
Add support for the AMD64 syntax [symbol wrt rip]. This is distinct from
authorPeter Johnson <peter@tortall.net>
Sun, 3 Aug 2003 21:13:20 +0000 (21:13 -0000)
committerPeter Johnson <peter@tortall.net>
Sun, 3 Aug 2003 21:13:20 +0000 (21:13 -0000)
commit654455dcefa5a771d77dbde54e229216f0c6ca3b
tree302c9ba134b8ee1ff21dbeb9e9dae2ed98705319
parent616be0ba0932586d95f2059068efc49173c5b4fe
Add support for the AMD64 syntax [symbol wrt rip].  This is distinct from
[rip+symbol] in that the latter adds the symbol offset to rip, whereas the
former is the same as [symbol] but uses rip-relative addressing.  This is
a minor overload of the WRT operator, but reads well and shouldn't conflict
with the use of WRT against sections.

Doing this currently adds a bit of overhead to all effective addresses in
64-bit mode (a $ symbol reference).  This is the cleanest approach I could
figure out; a time/space trade could be made later, such as prescanning for
RIP usage before allocating the symbol.

svn path=/trunk/yasm/; revision=1032
14 files changed:
modules/arch/x86/tests/Makefile.inc
modules/arch/x86/tests/mem64rip.asm [new file with mode: 0644]
modules/arch/x86/tests/mem64rip.errwarn [new file with mode: 0644]
modules/arch/x86/tests/mem64rip.hex [new file with mode: 0644]
modules/arch/x86/x86arch.h
modules/arch/x86/x86bc.c
modules/arch/x86/x86expr.c
modules/arch/x86/x86id.re
modules/objfmts/elf/tests/Makefile.inc
modules/objfmts/elf/tests/amd64/Makefile.inc [new file with mode: 0644]
modules/objfmts/elf/tests/amd64/elf-rip.asm [new file with mode: 0644]
modules/objfmts/elf/tests/amd64/elf-rip.errwarn [new file with mode: 0644]
modules/objfmts/elf/tests/amd64/elf-rip.hex [new file with mode: 0644]
modules/objfmts/elf/tests/amd64/elf_amd64_test.sh [new file with mode: 0755]