summaryrefslogtreecommitdiff
path: root/test/gotoff64.asm
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2012-05-15 22:27:48 +0100
committerAnas Nashif <anas.nashif@intel.com>2012-05-15 22:27:48 +0100
commitb9fad1ab2ad3bd87bff05c4688c978d582ada438 (patch)
tree4a373f8dd867d20e67510de7cfe447a4b58c1a70 /test/gotoff64.asm
parent65c26d26fb72cec0d43d199c72ed27513d17f4c9 (diff)
downloadnasm-b9fad1ab2ad3bd87bff05c4688c978d582ada438.tar.gz
nasm-b9fad1ab2ad3bd87bff05c4688c978d582ada438.tar.bz2
nasm-b9fad1ab2ad3bd87bff05c4688c978d582ada438.zip
Upstream version 2.08rc7
Diffstat (limited to 'test/gotoff64.asm')
-rw-r--r--test/gotoff64.asm25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/gotoff64.asm b/test/gotoff64.asm
new file mode 100644
index 0000000..05f5882
--- /dev/null
+++ b/test/gotoff64.asm
@@ -0,0 +1,25 @@
+;Testname=noerr; Arguments=-felf64 -ogotoff64.o; Files=stdout stderr gotoff64.o
+;Testname=err; Arguments=-DERROR -felf64 -ogotoff64.o; Files=stdout stderr gotoff64.o
+
+ bits 64
+ default rel
+
+ extern foo
+
+ mov r15,[foo wrt ..got]
+ lea r12,[foo wrt ..got]
+%ifdef ERROR
+ lea rax,[foo wrt ..gotoff]
+ mov rax,[foo wrt ..gotoff]
+%endif
+
+ default abs
+
+ mov r15,[foo wrt ..got]
+ lea r12,[foo wrt ..got]
+ mov rax,[qword foo wrt ..got]
+%ifdef ERROR
+ lea rax,[foo wrt ..gotoff]
+ mov rax,[foo wrt ..gotoff]
+%endif
+ mov rax,[qword foo wrt ..gotoff]