mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-03-25 18:10:23 +08:00
test: travis -- Add some of converted tests
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
parent
5453388940
commit
2e1bf723a9
4
travis/test/_file_.asm
Normal file
4
travis/test/_file_.asm
Normal file
@ -0,0 +1,4 @@
|
||||
db __FILE__, `\r\n`
|
||||
db __FILE__, `\r\n`
|
||||
dw __LINE__
|
||||
dw __LINE__
|
BIN
travis/test/_file_.bin.t
Normal file
BIN
travis/test/_file_.bin.t
Normal file
Binary file not shown.
8
travis/test/_file_.json
Normal file
8
travis/test/_file_.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"description": "Check the __FILE__ preprocessor directive",
|
||||
"format": "bin",
|
||||
"source": "_file_.asm",
|
||||
"target": [
|
||||
{ "output": "_file_.bin" }
|
||||
]
|
||||
}
|
7
travis/test/_version.json
Normal file
7
travis/test/_version.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "Check the NASM version",
|
||||
"target": [
|
||||
{ "option": "-v", "stdout": "_version.stdout" }
|
||||
],
|
||||
"error": "over"
|
||||
}
|
1
travis/test/_version.stdout
Normal file
1
travis/test/_version.stdout
Normal file
@ -0,0 +1 @@
|
||||
NASM version 2.14rc0 compiled on Apr 25 2018
|
7
travis/test/a32offs.asm
Normal file
7
travis/test/a32offs.asm
Normal file
@ -0,0 +1,7 @@
|
||||
bits 16
|
||||
foo: a32 loop foo
|
||||
bar: loop bar, ecx
|
||||
|
||||
bits 32
|
||||
baz: a16 loop baz
|
||||
qux: loop qux, cx
|
1
travis/test/a32offs.bin.t
Normal file
1
travis/test/a32offs.bin.t
Normal file
@ -0,0 +1 @@
|
||||
g<EFBFBD>g<EFBFBD>g<EFBFBD>g<EFBFBD>
|
18
travis/test/a32offs.json
Normal file
18
travis/test/a32offs.json
Normal file
@ -0,0 +1,18 @@
|
||||
[
|
||||
{
|
||||
"description": "Check a16/a32 address prefix (-Ox)",
|
||||
"id": "a32offs",
|
||||
"format": "bin",
|
||||
"source": "a32offs.asm",
|
||||
"option": "-Ox",
|
||||
"target": [
|
||||
{ "output": "a32offs.bin" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Check a16/a32 address prefix (-O0)",
|
||||
"ref": "a32offs",
|
||||
"option": "-O0",
|
||||
"update": false
|
||||
}
|
||||
]
|
38
travis/test/absolute.asm
Normal file
38
travis/test/absolute.asm
Normal file
@ -0,0 +1,38 @@
|
||||
org 7c00h
|
||||
init_foo:
|
||||
jmp init_bar
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
|
||||
init_bar:
|
||||
mov [b1],dl
|
||||
mov [b2],edx
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
ret
|
||||
|
||||
absolute init_bar+7
|
||||
b1: resb 1
|
||||
b2: resd 6
|
1
travis/test/absolute.bin.t
Normal file
1
travis/test/absolute.bin.t
Normal file
@ -0,0 +1 @@
|
||||
<EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>|f<EFBFBD>|<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
8
travis/test/absolute.json
Normal file
8
travis/test/absolute.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"description": "Check absolute addressing",
|
||||
"format": "bin",
|
||||
"source": "absolute.asm",
|
||||
"target": [
|
||||
{ "output": "absolute.bin" }
|
||||
]
|
||||
}
|
15
travis/test/addr64x.asm
Normal file
15
travis/test/addr64x.asm
Normal file
@ -0,0 +1,15 @@
|
||||
bits 64
|
||||
mov rdx,[rax]
|
||||
mov eax,[byte rsp+0x01]
|
||||
mov eax,[byte rsp-0x01]
|
||||
mov eax,[byte rsp+0xFF]
|
||||
mov eax,[byte rsp-0xFF]
|
||||
mov eax,[rsp+0x08]
|
||||
mov eax,[rsp-0x01]
|
||||
mov eax,[rsp+0xFF]
|
||||
mov eax,[rsp-0xFF]
|
||||
mov rax,[rsp+56]
|
||||
mov [rsi],dl
|
||||
mov byte [rsi],'-'
|
||||
mov [rsi],al
|
||||
mov byte [rsi],' '
|
BIN
travis/test/addr64x.bin.t
Normal file
BIN
travis/test/addr64x.bin.t
Normal file
Binary file not shown.
25
travis/test/addr64x.json
Normal file
25
travis/test/addr64x.json
Normal file
@ -0,0 +1,25 @@
|
||||
[
|
||||
{
|
||||
"description": "Check 64-bit addressing (-Ox)",
|
||||
"id": "addr64x",
|
||||
"format": "bin",
|
||||
"source": "addr64x.asm",
|
||||
"option": "-Ox",
|
||||
"target": [
|
||||
{ "output": "addr64x.bin" },
|
||||
{ "stderr": "addr64x.stderr" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Check 64-bit addressing (-O1)",
|
||||
"ref": "addr64x",
|
||||
"option": "-O1",
|
||||
"update": "false"
|
||||
},
|
||||
{
|
||||
"description": "Check 64-bit addressing (-O0)",
|
||||
"ref": "addr64x",
|
||||
"option": "-O0",
|
||||
"update": "false"
|
||||
}
|
||||
]
|
4
travis/test/addr64x.stderr
Normal file
4
travis/test/addr64x.stderr
Normal file
@ -0,0 +1,4 @@
|
||||
./travis/test/addr64x.asm:5: warning: byte data exceeds bounds [-w+number-overflow]
|
||||
./travis/test/addr64x.asm:5: warning: byte data exceeds bounds [-w+number-overflow]
|
||||
./travis/test/addr64x.asm:6: warning: byte data exceeds bounds [-w+number-overflow]
|
||||
./travis/test/addr64x.asm:6: warning: byte data exceeds bounds [-w+number-overflow]
|
16
travis/test/align13.asm
Normal file
16
travis/test/align13.asm
Normal file
@ -0,0 +1,16 @@
|
||||
; Test of non-power-of-2 alignment
|
||||
|
||||
bits 32
|
||||
|
||||
inc eax
|
||||
inc eax
|
||||
align 13
|
||||
inc eax
|
||||
inc eax
|
||||
align 13
|
||||
inc eax
|
||||
inc eax
|
||||
align 13
|
||||
align 13 ;should do nothing
|
||||
inc eax
|
||||
inc eax
|
25
travis/test/align13.json
Normal file
25
travis/test/align13.json
Normal file
@ -0,0 +1,25 @@
|
||||
[
|
||||
{
|
||||
"description": "Test of non-power-of-2 alignment (-Ox)",
|
||||
"id": "align13",
|
||||
"format": "bin",
|
||||
"source": "align13.asm",
|
||||
"option": "-Ox -o align13.bin",
|
||||
"target": [
|
||||
{ "stderr": "align13.stderr" }
|
||||
],
|
||||
"error": "expected"
|
||||
},
|
||||
{
|
||||
"description": "Test of non-power-of-2 alignment (-O1)",
|
||||
"ref": "align13",
|
||||
"option": "-O1 -o align13.bin",
|
||||
"update": "false"
|
||||
},
|
||||
{
|
||||
"description": "Test of non-power-of-2 alignment (-O0)",
|
||||
"ref": "align13",
|
||||
"option": "-O0 -o align13.bin",
|
||||
"update": "false"
|
||||
}
|
||||
]
|
4
travis/test/align13.stderr
Normal file
4
travis/test/align13.stderr
Normal file
@ -0,0 +1,4 @@
|
||||
./travis/test/align13.asm:7: error: segment alignment `13' is not power of two
|
||||
./travis/test/align13.asm:10: error: segment alignment `13' is not power of two
|
||||
./travis/test/align13.asm:13: error: segment alignment `13' is not power of two
|
||||
./travis/test/align13.asm:14: error: segment alignment `13' is not power of two
|
1448
travis/test/tmap.asm
Normal file
1448
travis/test/tmap.asm
Normal file
File diff suppressed because it is too large
Load Diff
10
travis/test/tmap.json
Normal file
10
travis/test/tmap.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"description": "Test abuse the section flags which breaks NASM 0.98.37",
|
||||
"format": "elf",
|
||||
"source": "tmap.asm",
|
||||
"option": "-DLINUX",
|
||||
"target": [
|
||||
{ "output": "tmap.o" },
|
||||
{ "stderr": "tmap.o.stderr" }
|
||||
]
|
||||
}
|
1
travis/test/tmap.o.stderr
Normal file
1
travis/test/tmap.o.stderr
Normal file
@ -0,0 +1 @@
|
||||
./travis/test/tmap.asm:938: warning: label alone on a line without a colon might be in error [-w+orphan-labels]
|
BIN
travis/test/tmap.o.t
Normal file
BIN
travis/test/tmap.o.t
Normal file
Binary file not shown.
26
travis/test/weirdpaste.asm
Normal file
26
travis/test/weirdpaste.asm
Normal file
@ -0,0 +1,26 @@
|
||||
%define foo xyzzy
|
||||
%define bar 1e+10
|
||||
|
||||
%define xyzzy1e 15
|
||||
|
||||
%macro dx 2
|
||||
%assign xx %1%2
|
||||
dw xx
|
||||
%endmacro
|
||||
|
||||
dx foo, bar
|
||||
|
||||
%macro df 2
|
||||
%assign xy __float32__(%1e+%2)
|
||||
dd xy
|
||||
dd %1e+%2
|
||||
%endmacro
|
||||
|
||||
df 1, 36
|
||||
df 33, 20
|
||||
df 0, 2
|
||||
df 1.2, 5
|
||||
|
||||
|
||||
%define N 1e%++%+ 5
|
||||
dd N, 1e+5
|
BIN
travis/test/weirdpaste.bin.t
Normal file
BIN
travis/test/weirdpaste.bin.t
Normal file
Binary file not shown.
30
travis/test/weirdpaste.i.t
Normal file
30
travis/test/weirdpaste.i.t
Normal file
@ -0,0 +1,30 @@
|
||||
%line 3+1 ./travis/test/weirdpaste.asm
|
||||
|
||||
|
||||
|
||||
%line 10+1 ./travis/test/weirdpaste.asm
|
||||
|
||||
dw 25
|
||||
|
||||
%line 18+1 ./travis/test/weirdpaste.asm
|
||||
|
||||
dd 2067830734
|
||||
%line 19+0 ./travis/test/weirdpaste.asm
|
||||
dd 1e+36
|
||||
%line 20+1 ./travis/test/weirdpaste.asm
|
||||
dd 1664279731
|
||||
%line 20+0 ./travis/test/weirdpaste.asm
|
||||
dd 33e+20
|
||||
%line 21+1 ./travis/test/weirdpaste.asm
|
||||
dd 0
|
||||
%line 21+0 ./travis/test/weirdpaste.asm
|
||||
dd 0e+2
|
||||
%line 22+1 ./travis/test/weirdpaste.asm
|
||||
dd 1206542336
|
||||
%line 22+0 ./travis/test/weirdpaste.asm
|
||||
dd 1.2e+5
|
||||
%line 23+1 ./travis/test/weirdpaste.asm
|
||||
|
||||
|
||||
|
||||
dd 1e+5, 1e+5
|
18
travis/test/weirdpaste.json
Normal file
18
travis/test/weirdpaste.json
Normal file
@ -0,0 +1,18 @@
|
||||
[
|
||||
{
|
||||
"description": "Check preprocessor paste operator (compile mode)",
|
||||
"format": "bin",
|
||||
"source": "weirdpaste.asm",
|
||||
"target": [
|
||||
{ "output": "weirdpaste.bin" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Check preprocessor paste operator (preprocessor mode)",
|
||||
"source": "weirdpaste.asm",
|
||||
"option": "-E",
|
||||
"target": [
|
||||
{ "output": "weirdpaste.i" }
|
||||
]
|
||||
}
|
||||
]
|
Loading…
x
Reference in New Issue
Block a user