test: nasm-t -- Add br3041451

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
Cyrill Gorcunov 2018-11-11 18:10:36 +03:00
parent 0feb41b087
commit 3402778330
4 changed files with 73 additions and 0 deletions

56
travis/test/br3041451.asm Normal file
View File

@ -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

BIN
travis/test/br3041451.bin.t Normal file

Binary file not shown.

View File

@ -0,0 +1,13 @@
[
{
"description": "Test rep directive",
"id": "br3041451",
"format": "bin",
"source": "br3041451.asm",
"option": "-Ox",
"target": [
{ "output": "br3041451.bin" },
{ "stderr": "br3041451.stderr" }
]
}
]

View File

@ -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]