aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2020-10-15 22:12:02 +0300
committerCyrill Gorcunov <gorcunov@gmail.com>2020-10-15 22:12:02 +0300
commit4431776fc003111e6bc4139d5d237d350bea372f (patch)
treea81313155ffcc65d732637044264b79f3474e8f0
parent8ff5cecc2989aedadf439481254fc22d80133726 (diff)
downloadnasm-4431776fc003111e6bc4139d5d237d350bea372f.tar.gz
nasm-4431776fc003111e6bc4139d5d237d350bea372f.tar.xz
nasm-4431776fc003111e6bc4139d5d237d350bea372f.zip
travis: add imm
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
-rw-r--r--travis/test/imm.asm26
-rw-r--r--travis/test/imm.json12
-rw-r--r--travis/test/imm.o.tbin0 -> 800 bytes
3 files changed, 38 insertions, 0 deletions
diff --git a/travis/test/imm.asm b/travis/test/imm.asm
new file mode 100644
index 00000000..d68a43dd
--- /dev/null
+++ b/travis/test/imm.asm
@@ -0,0 +1,26 @@
+ bits 64
+
+ mov eax,1
+ mov eax,-1
+ mov eax,0x11111111
+ mov ecx,2
+ add ecx,-6
+ add ecx,strict dword -6
+ add ecx,4
+ add ecx,strict dword 4
+ add ecx,10000
+ xor ecx,0xffffffff
+ xor ecx,dword 0xffffffff
+ xor ecx,strict dword 0xffffffff
+ xor ecx,-1
+ xor ecx,dword -1
+ xor ecx,strict dword -1
+ add edx,byte ($-$$)
+
+ mov rax, 0xfafafafaafafafaf
+
+%ifnidn __OUTPUT_FORMAT__,bin
+ extern foo, bar
+ add eax,byte foo
+ add edx,byte (bar-$$)
+%endif
diff --git a/travis/test/imm.json b/travis/test/imm.json
new file mode 100644
index 00000000..f2d9a119
--- /dev/null
+++ b/travis/test/imm.json
@@ -0,0 +1,12 @@
+[
+ {
+ "description": "Test immediates",
+ "id": "imm",
+ "format": "elf64",
+ "source": "imm.asm",
+ "option": "-Ox",
+ "target": [
+ { "output": "imm.o" }
+ ]
+ }
+]
diff --git a/travis/test/imm.o.t b/travis/test/imm.o.t
new file mode 100644
index 00000000..4d8c5d56
--- /dev/null
+++ b/travis/test/imm.o.t
Binary files differ