aboutsummaryrefslogtreecommitdiffstats
path: root/travis/test
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2018-11-11 18:10:36 +0300
committerCyrill Gorcunov <gorcunov@gmail.com>2018-11-11 21:43:46 +0300
commit3402778330bbbfa80254b94b3dacd80e8d40ecb7 (patch)
tree9cd759a8b493088dfe8ad99a389fe56abe281363 /travis/test
parent0feb41b08706643baf5770c81d1d104ccef436eb (diff)
downloadnasm-3402778330bbbfa80254b94b3dacd80e8d40ecb7.tar.gz
nasm-3402778330bbbfa80254b94b3dacd80e8d40ecb7.tar.xz
nasm-3402778330bbbfa80254b94b3dacd80e8d40ecb7.zip
test: nasm-t -- Add br3041451
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Diffstat (limited to 'travis/test')
-rw-r--r--travis/test/br3041451.asm56
-rw-r--r--travis/test/br3041451.bin.tbin0 -> 10 bytes
-rw-r--r--travis/test/br3041451.json13
-rw-r--r--travis/test/br3041451.stderr4
4 files changed, 73 insertions, 0 deletions
diff --git a/travis/test/br3041451.asm b/travis/test/br3041451.asm
new file mode 100644
index 00000000..12f55a0b
--- /dev/null
+++ b/travis/test/br3041451.asm
@@ -0,0 +1,56 @@
+ [bits 64]
+
+ ;
+ ; HIT: Maximum possible value
+ %assign i 0
+ %rep 1000000
+ mov rax, i
+ %assign i i+1
+ %if i == 2
+ %exitrep
+ %endif
+ %endrep
+
+ ;
+ ; MISS: It's negative
+ %assign i 0
+ %rep 0xffffFFFFffffFFFE
+ mov rax, 0xffffFFFFffffFFFE
+ %assign i i+1
+ %if i == 2
+ %exitrep
+ %endif
+ %endrep
+
+ ;
+ ; MISS: It's negative
+ %assign i 0
+ %rep 0xffffFFFFffffFFFF
+ db i
+ %assign i i+1
+ %if i == 2
+ %exitrep
+ %endif
+ %endrep
+
+ ;
+ ; MISS: It's negative
+ %assign i 0
+ %rep -2
+ db i
+ %assign i i+1
+ %if i == 2
+ %exitrep
+ %endif
+ %endrep
+
+ ;
+ ; MISS: It's negative
+ %assign i 0
+ %rep -1
+ db i
+ %assign i i+1
+ %if i == 2
+ %exitrep
+ %endif
+ %endrep
diff --git a/travis/test/br3041451.bin.t b/travis/test/br3041451.bin.t
new file mode 100644
index 00000000..83aa34c8
--- /dev/null
+++ b/travis/test/br3041451.bin.t
Binary files differ
diff --git a/travis/test/br3041451.json b/travis/test/br3041451.json
new file mode 100644
index 00000000..c5d8df72
--- /dev/null
+++ b/travis/test/br3041451.json
@@ -0,0 +1,13 @@
+[
+ {
+ "description": "Test rep directive",
+ "id": "br3041451",
+ "format": "bin",
+ "source": "br3041451.asm",
+ "option": "-Ox",
+ "target": [
+ { "output": "br3041451.bin" },
+ { "stderr": "br3041451.stderr" }
+ ]
+ }
+]
diff --git a/travis/test/br3041451.stderr b/travis/test/br3041451.stderr
new file mode 100644
index 00000000..802a799c
--- /dev/null
+++ b/travis/test/br3041451.stderr
@@ -0,0 +1,4 @@
+./travis/test/br3041451.asm:17: warning: negative `%rep' count: -2 [-w+negative-rep]
+./travis/test/br3041451.asm:28: warning: negative `%rep' count: -1 [-w+negative-rep]
+./travis/test/br3041451.asm:39: warning: negative `%rep' count: -2 [-w+negative-rep]
+./travis/test/br3041451.asm:50: warning: negative `%rep' count: -1 [-w+negative-rep] \ No newline at end of file