test: nasm-t -- Add lar_lsl test

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
Cyrill Gorcunov 2018-11-04 19:38:41 +03:00
parent 89e625f2bf
commit de020d0a3c
3 changed files with 133 additions and 0 deletions

122
travis/test/lar_lsl.asm Normal file
View File

@ -0,0 +1,122 @@
; LAR/LSL
;---------
; 1x ; = invalid due to lack of REX
; 3x ; = invalid due to Mw
%macro m 1
bits 16
%1 ax, ax
%1 ax,eax
; %1 ax,rax
%1 eax, ax
%1 eax,eax
; %1 eax,rax
; %1 rax, ax
; %1 rax,eax
; %1 rax,rax
%1 ax, [0]
%1 ax, word [0]
;;; %1 ax,dword [0]
; %1 ax,qword [0]
%1 eax, [0]
%1 eax, word [0]
;;; %1 eax,dword [0]
; %1 eax,qword [0]
; %1 rax, [0]
; %1 rax, word [0]
; %1 rax,dword [0]
; %1 rax,qword [0]
bits 32
%1 ax, ax
%1 ax,eax
; %1 ax,rax
%1 eax, ax
%1 eax,eax
; %1 eax,rax
; %1 rax, ax
; %1 rax,eax
; %1 rax,rax
%1 ax, [0]
%1 ax, word [0]
;;; %1 ax,dword [0]
; %1 ax,qword [0]
%1 eax, [0]
%1 eax, word [0]
;;; %1 eax,dword [0]
; %1 eax,qword [0]
; %1 rax, [0]
; %1 rax, word [0]
; %1 rax,dword [0]
; %1 rax,qword [0]
bits 64
%1 ax, ax
%1 ax,eax
%1 ax,rax ; $TODO: shouldn't emit REX.W $
%1 eax, ax
%1 eax,eax
%1 eax,rax ; $TODO: shouldn't emit REX.W $
%1 rax, ax
%1 rax,eax
%1 rax,rax
%1 ax, [0]
%1 ax, word [0]
;;; %1 ax,dword [0]
;;; %1 ax,qword [0]
%1 eax, [0]
%1 eax, word [0]
;;; %1 eax,dword [0]
;;; %1 eax,qword [0]
%1 rax, [0]
%1 rax, word [0]
;;; %1 rax,dword [0]
;;; %1 rax,qword [0]
%endmacro
m lar
m lsl
bits 16
lar ax,[ si]
lar ax,[esi]
bits 32
lar ax,[ si]
lar ax,[esi]
bits 64
lar ax,[esi]
lar ax,[rsi]
bits 16
lsl ax,[ si]
lsl ax,[esi]
bits 32
lsl ax,[ si]
lsl ax,[esi]
bits 64
lar ax,[esi]
lsl ax,[rsi]
; EOF

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

Binary file not shown.

11
travis/test/lar_lsl.json Normal file
View File

@ -0,0 +1,11 @@
[
{
"description": "Test lar lsr with macros",
"id": "lar_lsl",
"format": "bin",
"source": "lar_lsl.asm",
"target": [
{ "output": "lar_lsl.bin" }
]
}
]