aboutsummaryrefslogtreecommitdiffstats
path: root/travis/test
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2018-12-23 13:17:58 +0300
committerCyrill Gorcunov <gorcunov@gmail.com>2018-12-23 17:22:44 +0300
commit929aa65385bee825f282c2efed8257b876c6f462 (patch)
tree129fb47c29a7c932bd84165200e0ab086bd7fd61 /travis/test
parent8274623093665a66ad279ea314d1700bcc6b04e3 (diff)
downloadnasm-929aa65385bee825f282c2efed8257b876c6f462.tar.gz
nasm-929aa65385bee825f282c2efed8257b876c6f462.tar.xz
nasm-929aa65385bee825f282c2efed8257b876c6f462.zip
test: nasm-t -- Add clzero case
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Diffstat (limited to 'travis/test')
-rw-r--r--travis/test/clzero.asm26
-rw-r--r--travis/test/clzero.bin.t1
-rw-r--r--travis/test/clzero.json21
-rw-r--r--travis/test/clzero.stderr.t3
4 files changed, 51 insertions, 0 deletions
diff --git a/travis/test/clzero.asm b/travis/test/clzero.asm
new file mode 100644
index 00000000..89597a9a
--- /dev/null
+++ b/travis/test/clzero.asm
@@ -0,0 +1,26 @@
+ bits 16
+
+ clzero
+ clzero ax
+ clzero eax
+%ifdef ERROR
+ clzero rax
+%endif
+
+ bits 32
+
+ clzero
+ clzero ax
+ clzero eax
+%ifdef ERROR
+ clzero rax
+%endif
+
+ bits 64
+
+ clzero
+%ifdef ERROR
+ clzero ax
+%endif
+ clzero eax
+ clzero rax
diff --git a/travis/test/clzero.bin.t b/travis/test/clzero.bin.t
new file mode 100644
index 00000000..f8f1825d
--- /dev/null
+++ b/travis/test/clzero.bin.t
@@ -0,0 +1 @@
+ggg \ No newline at end of file
diff --git a/travis/test/clzero.json b/travis/test/clzero.json
new file mode 100644
index 00000000..a4215aec
--- /dev/null
+++ b/travis/test/clzero.json
@@ -0,0 +1,21 @@
+[
+ {
+ "description": "Test CLZERO instruction (ax/eax/rax)",
+ "id": "clzero",
+ "format": "bin",
+ "source": "clzero.asm",
+ "option": "-Ox",
+ "target": [
+ { "output": "clzero.bin" }
+ ]
+ },
+ {
+ "description": "Test unsupported CLZERO instruction",
+ "ref": "clzero",
+ "option": "-Ox -DERROR",
+ "target": [
+ { "stderr": "clzero.stderr.t" }
+ ],
+ "error": "expected"
+ }
+]
diff --git a/travis/test/clzero.stderr.t b/travis/test/clzero.stderr.t
new file mode 100644
index 00000000..1b312d33
--- /dev/null
+++ b/travis/test/clzero.stderr.t
@@ -0,0 +1,3 @@
+./travis/test/clzero.asm:7: error: instruction not supported in 16-bit mode
+./travis/test/clzero.asm:16: error: instruction not supported in 32-bit mode
+./travis/test/clzero.asm:23: error: instruction not supported in 64-bit mode \ No newline at end of file