test: nasm-t -- Add movimm

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
Cyrill Gorcunov 2018-11-05 12:23:02 +03:00
parent 2776c76763
commit fbd4b32da9
6 changed files with 71 additions and 0 deletions

BIN
travis/test/movimm-o0.bin.t Normal file

Binary file not shown.

View File

@ -0,0 +1,10 @@
./travis/test/movimm.asm:6: warning: dword data exceeds bounds [-w+number-overflow]
./travis/test/movimm.asm:7: warning: signed dword immediate exceeds bounds [-w+number-overflow]
./travis/test/movimm.asm:7: warning: dword data exceeds bounds [-w+number-overflow]
./travis/test/movimm.asm:9: warning: dword data exceeds bounds [-w+number-overflow]
./travis/test/movimm.asm:10: warning: signed dword immediate exceeds bounds [-w+number-overflow]
./travis/test/movimm.asm:10: warning: dword data exceeds bounds [-w+number-overflow]
./travis/test/movimm.asm:11: warning: dword data exceeds bounds [-w+number-overflow]
./travis/test/movimm.asm:12: warning: signed dword immediate exceeds bounds [-w+number-overflow]
./travis/test/movimm.asm:12: warning: dword data exceeds bounds [-w+number-overflow]
./travis/test/movimm.asm:15: warning: dword data exceeds bounds [-w+number-overflow]

View File

@ -0,0 +1 @@
HОмxV4ОмHгюОмHОмxV4гОмHгОмгОмHгОмгОмxV4xV4HгюxV4xV4гxV4HгxV4гxV4HгxV4гxV4

View File

@ -0,0 +1,10 @@
./travis/test/movimm.asm:6: warning: dword data exceeds bounds [-w+number-overflow]
./travis/test/movimm.asm:7: warning: signed dword immediate exceeds bounds [-w+number-overflow]
./travis/test/movimm.asm:7: warning: dword data exceeds bounds [-w+number-overflow]
./travis/test/movimm.asm:9: warning: dword data exceeds bounds [-w+number-overflow]
./travis/test/movimm.asm:10: warning: signed dword immediate exceeds bounds [-w+number-overflow]
./travis/test/movimm.asm:10: warning: dword data exceeds bounds [-w+number-overflow]
./travis/test/movimm.asm:11: warning: dword data exceeds bounds [-w+number-overflow]
./travis/test/movimm.asm:12: warning: signed dword immediate exceeds bounds [-w+number-overflow]
./travis/test/movimm.asm:12: warning: dword data exceeds bounds [-w+number-overflow]
./travis/test/movimm.asm:15: warning: dword data exceeds bounds [-w+number-overflow]

28
travis/test/movimm.asm Normal file
View File

@ -0,0 +1,28 @@
;Testname=unoptimized; Arguments=-fbin -omovimm.bin -O0; Files=stdout stderr movimm.bin
;Testname=optimized; Arguments=-fbin -omovimm.bin -Ox; Files=stdout stderr movimm.bin
bits 64
mov rax,1234567890abcdefh
mov eax,1234567890abcdefh
mov rax,dword 1234567890abcdefh
mov rax,qword 1234567890abcdefh
mov dword [rsi],1234567890abcdefh
mov qword [rsi],1234567890abcdefh
mov dword [rsi],dword 1234567890abcdefh
mov qword [rsi],dword 1234567890abcdefh
; mov qword [rsi],qword 1234567890abcdefh ; Error
; mov [rsi],qword 1234567890abcdefh ; Error
mov [rsi],dword 1234567890abcdefh
; The optimizer probably should compact these forms, doesn't yet?
mov rax,12345678h
mov eax,12345678h
mov rax,dword 12345678h
mov rax,qword 12345678h
mov dword [rsi],12345678h
mov qword [rsi],12345678h
mov dword [rsi],dword 12345678h
mov qword [rsi],dword 12345678h
; mov qword [rsi],qword 12345678h ; Error
; mov [rsi],qword 12345678h ; Error
mov [rsi],dword 12345678h

22
travis/test/movimm.json Normal file
View File

@ -0,0 +1,22 @@
[
{
"description": "Test mov imm intruction (-Ox)",
"id": "movimm",
"format": "bin",
"source": "movimm.asm",
"option": "-Ox",
"target": [
{ "output": "movimm-ox.bin" },
{ "stderr": "movimm-ox.stderr" }
]
},
{
"description": "Test mov imm intruction (-O0)",
"ref": "movimm",
"option": "-O0",
"target": [
{ "output": "movimm-o0.bin" },
{ "stderr": "movimm-o0.stderr" }
]
}
]