aboutsummaryrefslogtreecommitdiffstats
path: root/travis
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2020-08-25 18:05:33 +0300
committerCyrill Gorcunov <gorcunov@gmail.com>2020-08-25 18:05:33 +0300
commit91d0980bfabeacb80269c88a097d078d9aadfcd2 (patch)
treeb7eec77118736819ba01525054a094eea76bf73b /travis
parentf2854471acedd4e05d659acf0694ba69cca22e12 (diff)
downloadnasm-91d0980bfabeacb80269c88a097d078d9aadfcd2.tar.gz
nasm-91d0980bfabeacb80269c88a097d078d9aadfcd2.tar.xz
nasm-91d0980bfabeacb80269c88a097d078d9aadfcd2.zip
travis: add ret
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Diffstat (limited to 'travis')
-rw-r--r--travis/test/ret-16.stderr1
-rw-r--r--travis/test/ret-32.stderr1
-rw-r--r--travis/test/ret-64.stderr1
-rw-r--r--travis/test/ret.asm61
-rw-r--r--travis/test/ret.bin.t1
-rw-r--r--travis/test/ret.json39
6 files changed, 104 insertions, 0 deletions
diff --git a/travis/test/ret-16.stderr b/travis/test/ret-16.stderr
new file mode 100644
index 00000000..1994fe9d
--- /dev/null
+++ b/travis/test/ret-16.stderr
@@ -0,0 +1 @@
+./travis/test/ret.asm:18: error: expression syntax error \ No newline at end of file
diff --git a/travis/test/ret-32.stderr b/travis/test/ret-32.stderr
new file mode 100644
index 00000000..b971af0e
--- /dev/null
+++ b/travis/test/ret-32.stderr
@@ -0,0 +1 @@
+./travis/test/ret.asm:37: error: expression syntax error \ No newline at end of file
diff --git a/travis/test/ret-64.stderr b/travis/test/ret-64.stderr
new file mode 100644
index 00000000..f06987b3
--- /dev/null
+++ b/travis/test/ret-64.stderr
@@ -0,0 +1 @@
+./travis/test/ret.asm:53: error: expression syntax error \ No newline at end of file
diff --git a/travis/test/ret.asm b/travis/test/ret.asm
new file mode 100644
index 00000000..0606257e
--- /dev/null
+++ b/travis/test/ret.asm
@@ -0,0 +1,61 @@
+;; All the flavors of RET
+%ifndef ERROR
+ %define ERROR 0
+%endif
+
+%ifdef TEST_BITS_16
+ bits 16
+
+ ret
+ retn
+ retf
+ retw
+ retnw
+ retfw
+ retd
+ retnd
+ retfd
+%if ERROR
+ retq
+ retnq
+ retfq
+%endif
+%endif
+
+%ifdef TEST_BITS_32
+ bits 32
+
+ ret
+ retn
+ retf
+ retw
+ retnw
+ retfw
+ retd
+ retnd
+ retfd
+%if ERROR
+ retq
+ retnq
+ retfq
+%endif
+%endif
+
+%ifdef TEST_BITS_64
+ bits 64
+
+ ret
+ retn
+ retf ; Probably should have been RETFQ, but: legacy...
+ retw
+ retnw
+ retfw
+%if ERROR
+ retd
+ retnd
+%endif
+%endif
+ retfd
+ retq
+ retnq
+ retfq
diff --git a/travis/test/ret.bin.t b/travis/test/ret.bin.t
new file mode 100644
index 00000000..246929c8
--- /dev/null
+++ b/travis/test/ret.bin.t
@@ -0,0 +1 @@
+fffffffffH \ No newline at end of file
diff --git a/travis/test/ret.json b/travis/test/ret.json
new file mode 100644
index 00000000..ce1d2ca5
--- /dev/null
+++ b/travis/test/ret.json
@@ -0,0 +1,39 @@
+[
+ {
+ "description": "Test all the flavors of RET",
+ "id": "ret",
+ "format": "bin",
+ "source": "ret.asm",
+ "option": "-Ox -DTEST_BITS_16 -DTEST_BITS_32 -DTEST_BITS_64",
+ "target": [
+ { "output": "ret.bin" }
+ ]
+ },
+ {
+ "description": "Test all the flavors of RET (err 16 bit)",
+ "ref": "ret",
+ "option": "-DERROR -DTEST_BITS_16 -o ret.bin",
+ "target": [
+ { "stderr": "ret-16.stderr" }
+ ],
+ "error": "expected"
+ },
+ {
+ "description": "Test all the flavors of RET (err 32 bit)",
+ "ref": "ret",
+ "option": "-DERROR -DTEST_BITS_32 -o ret.bin",
+ "target": [
+ { "stderr": "ret-32.stderr" }
+ ],
+ "error": "expected"
+ },
+ {
+ "description": "Test all the flavors of RET (err 64 bit)",
+ "ref": "ret",
+ "option": "-DERROR -DTEST_BITS_64 -o ret.bin",
+ "target": [
+ { "stderr": "ret-64.stderr" }
+ ],
+ "error": "expected"
+ }
+]