summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/align13.asm3
-rw-r--r--test/align13s.asm4
-rw-r--r--test/alonesym-obj.asm3
-rw-r--r--test/bcd.asm2
-rw-r--r--test/br2003451.asm2
-rw-r--r--test/br2030823.asm4
-rw-r--r--test/br3005117.asm2
-rw-r--r--test/br3026808.asm2
-rw-r--r--test/br3028880.asm2
-rw-r--r--test/br3058845.asm2
-rw-r--r--test/br3066383.asm2
-rw-r--r--test/br3074517.asm12
-rw-r--r--test/br3092924.asm25
-rw-r--r--test/br3104312.asm11
-rw-r--r--test/imm64.asm50
-rw-r--r--test/prefix66.asm28
-rw-r--r--test/sreg.asm65
17 files changed, 217 insertions, 2 deletions
diff --git a/test/align13.asm b/test/align13.asm
index 556373fc..4a41a779 100644
--- a/test/align13.asm
+++ b/test/align13.asm
@@ -1,3 +1,6 @@
+;Testname=unoptimized; Arguments=-O0 -fbin -oalign13.bin; Files=stdout stderr align13.bin
+;Testname=optimized; Arguments=-Ox -fbin -oalign13.bin; Files=stdout stderr align13.bin
+
; Test of non-power-of-2 alignment
bits 32
diff --git a/test/align13s.asm b/test/align13s.asm
index dab21a20..7f783175 100644
--- a/test/align13s.asm
+++ b/test/align13s.asm
@@ -1,4 +1,8 @@
+;Testname=unoptimized; Arguments=-O0 -fbin -oalign13s.bin; Files=stdout stderr align13s.bin
+;Testname=optimized; Arguments=-Ox -fbin -oalign13s.bin; Files=stdout stderr align13s.bin
+
; Test of non-power-of-2 alignment
+
%use smartalign
bits 32
diff --git a/test/alonesym-obj.asm b/test/alonesym-obj.asm
index 6be4d5db..8db3a2c4 100644
--- a/test/alonesym-obj.asm
+++ b/test/alonesym-obj.asm
@@ -1,3 +1,6 @@
+;Testname=unoptimized; Arguments=-O0 -fobj -oalonesym-obj.obj; Files=stdout stderr alonesym-obj.obj
+;Testname=optimized; Arguments=-Ox -fobj -oalonesym-obj.obj; Files=stdout stderr alonesym-obj.obj
+
section DOS32DATA align=16 public use32 FLAT class=DOS32DATA
global sym0000
diff --git a/test/bcd.asm b/test/bcd.asm
index bb45ca64..b58d81aa 100644
--- a/test/bcd.asm
+++ b/test/bcd.asm
@@ -1,3 +1,5 @@
+;Testname=optimized; Arguments=-Ox -fbin -obcd.bin; Files=stdout stderr bcd.bin
+
dt 765432109876543210p
dt -765432109876543210p
dt +765432109876543210p
diff --git a/test/br2003451.asm b/test/br2003451.asm
index fb309a99..74e32345 100644
--- a/test/br2003451.asm
+++ b/test/br2003451.asm
@@ -1,3 +1,5 @@
+;Testname=optimized; Arguments=-Ox -fbin -obr2003451.bin; Files=stdout stderr br2003451.bin
+
cpu 8086
org 0
diff --git a/test/br2030823.asm b/test/br2030823.asm
index ce7ba43d..fd8f5eba 100644
--- a/test/br2030823.asm
+++ b/test/br2030823.asm
@@ -1,4 +1,6 @@
- bits 64
+;Testname=optimized; Arguments=-Ox -fbin -obr2030823.bin; Files=stdout stderr br2030823.bin
+
+bits 64
VFMADDPD xmm0, xmm1, [0], xmm3
VFMADDPD xmm0, xmm1, xmm2, [0]
VFMADDPD ymm0, ymm1, [0], ymm3
diff --git a/test/br3005117.asm b/test/br3005117.asm
index 4e7a5b5b..66a46f8f 100644
--- a/test/br3005117.asm
+++ b/test/br3005117.asm
@@ -1,3 +1,5 @@
+;Testname=br3005117; Arguments=-Ox -felf -obr3005117.o; Files=stdout stderr br3005117.o
+
%macro B_STRUC 1-*
%push foo
%define %$strucname %1
diff --git a/test/br3026808.asm b/test/br3026808.asm
index 5c61c953..d84923a1 100644
--- a/test/br3026808.asm
+++ b/test/br3026808.asm
@@ -1,3 +1,5 @@
+;Testname=br3026808; Arguments=-Ox -fbin -obr3026808.o; Files=stdout stderr br3026808.o
+
%imacro proc 1
%push proc
%assign %$arg 1
diff --git a/test/br3028880.asm b/test/br3028880.asm
index 20c8bd09..b6b2cf2b 100644
--- a/test/br3028880.asm
+++ b/test/br3028880.asm
@@ -1,3 +1,5 @@
+;Testname=br3028880; Arguments=-Ox -fbin -obr3028880.o; Files=stdout stderr br3028880.o
+
%macro import 1
%define %%incfile %!PROJECTBASEDIR/%{1}.inc
%endmacro
diff --git a/test/br3058845.asm b/test/br3058845.asm
index b0de5607..c42f5d50 100644
--- a/test/br3058845.asm
+++ b/test/br3058845.asm
@@ -11,4 +11,4 @@ cmp eax, 0xFFFF_FFFF
BITS 64
cmp ax, 0xFFFF
-cmp eax, 0xFFFF_FFFF ; shouldn't warn, but does currently
+cmp eax, 0xFFFF_FFFF
diff --git a/test/br3066383.asm b/test/br3066383.asm
index 09222ac7..d6a8646b 100644
--- a/test/br3066383.asm
+++ b/test/br3066383.asm
@@ -1,3 +1,5 @@
+;Testname=br3066383; Arguments=-Ox -fbin -obr3066383.bin; Files=stdout stderr br3066383.bin
+
;
; this is a for BR3005117
; http://sourceforge.net/tracker/?func=detail&aid=3005117&group_id=6208&atid=106208
diff --git a/test/br3074517.asm b/test/br3074517.asm
new file mode 100644
index 00000000..96978095
--- /dev/null
+++ b/test/br3074517.asm
@@ -0,0 +1,12 @@
+;%define UNDEFINED
+%macro macro 0
+ %ifndef UNDEFINED
+ %rep 1
+ %fatal This should display "fatal: (m:3)"
+ %endrep
+ %endif
+ %fatal This should display "fatal: (m:6)" if 'UNDEFINED' defined
+%endmacro
+
+macro
+
diff --git a/test/br3092924.asm b/test/br3092924.asm
new file mode 100644
index 00000000..3f9cde04
--- /dev/null
+++ b/test/br3092924.asm
@@ -0,0 +1,25 @@
+%define RNUM 0x10000 ; max of relocations in a section is 0xffff
+
+section .data1
+ r1 dd RNUM
+
+section .data2
+ r2 dd RNUM
+
+%macro x1 1
+ mov eax, [r1 + %1]
+%endmacro
+
+%macro x2 1
+ mov eax, [r2 + %1]
+%endmacro
+
+section .text1
+
+ %assign i 0
+ %rep RNUM
+ x1 i
+ x2 i
+ %assign i i+1
+ %endrep
+
diff --git a/test/br3104312.asm b/test/br3104312.asm
new file mode 100644
index 00000000..0dee16b8
--- /dev/null
+++ b/test/br3104312.asm
@@ -0,0 +1,11 @@
+%if 1 < 8000_0002h
+ %warning No bug with 8000_0002h
+%else
+ %warning Bug with 8000_0002h
+%endif
+
+%if 1 < 8000_0001h
+ %warning No bug with 8000_0001h
+%else
+ %warning Bug with 8000_0001h
+%endif
diff --git a/test/imm64.asm b/test/imm64.asm
index d90a0642..a1140443 100644
--- a/test/imm64.asm
+++ b/test/imm64.asm
@@ -9,3 +9,53 @@
mov [rax],dword 11223344h ; 32-bit operation
mov qword [rax],11223344h
mov qword [rax],dword 11223344h
+
+ mov rax,0_ffffffff_8899aabbh
+ mov rax,dword 0_ffffffff_8899aabbh
+ mov eax,0_ffffffff_8899aabbh
+ mov [rax],dword 0_ffffffff_8899aabbh ; 32-bit operation
+ mov qword [rax],0_ffffffff_8899aabbh
+ mov qword [rax],dword 0_ffffffff_8899aabbh
+
+ mov rax,7fffffffh
+ mov rax,80000000h
+ mov rax,0_ffffffffh
+ mov rax,1_00000000h
+ mov rax,0_ffffffff_7fffffffh
+ mov rax,0_ffffffff_80000000h
+
+ mov rax,0_11223344_8899aabbh
+ mov rax,dword 0_11223344_8899aabbh
+ mov eax,0_11223344_8899aabbh
+ mov [rax],dword 0_11223344_8899aabbh ; 32-bit operation
+ mov qword [rax],0_11223344_8899aabbh
+ mov qword [rax],dword 0_11223344_8899aabbh
+
+ mov rax,strict 11223344h
+ mov rax,strict dword 11223344h
+ mov eax,strict 11223344h
+ mov [rax],strict dword 11223344h ; 32-bit operation
+ mov qword [rax],strict 11223344h
+ mov qword [rax],strict dword 11223344h
+
+ mov rax,strict 0_ffffffff_8899aabbh
+ mov rax,strict dword 0_ffffffff_8899aabbh
+ mov eax,strict 0_ffffffff_8899aabbh
+ mov [rax],strict dword 0_ffffffff_8899aabbh ; 32-bit operation
+ mov qword [rax],strict 0_ffffffff_8899aabbh
+ mov qword [rax],strict dword 0_ffffffff_8899aabbh
+
+ mov rax,strict 7fffffffh
+ mov rax,strict 80000000h
+ mov rax,strict 0_ffffffffh
+ mov rax,strict 1_00000000h
+ mov rax,strict 0_ffffffff_7fffffffh
+ mov rax,strict 0_ffffffff_80000000h
+
+ mov rax,strict 0_11223344_8899aabbh
+ mov rax,strict dword 0_11223344_8899aabbh
+ mov eax,strict 0_11223344_8899aabbh
+ mov [rax],strict dword 0_11223344_8899aabbh ; 32-bit operation
+ mov qword [rax],strict 0_11223344_8899aabbh
+ mov qword [rax],strict dword 0_11223344_8899aabbh
+
diff --git a/test/prefix66.asm b/test/prefix66.asm
new file mode 100644
index 00000000..4d9eb00a
--- /dev/null
+++ b/test/prefix66.asm
@@ -0,0 +1,28 @@
+;Testname=test; Arguments=-fbin -oprefix66.bin; Files=stdout stderr prefix66.bin
+
+BITS 16
+cmp ax, 1
+o16 cmp ax, 1
+o32 cmp ax, 1
+
+cmp eax, 1
+o16 cmp eax, 1
+o32 cmp eax, 1
+
+BITS 32
+cmp ax, 1
+o16 cmp ax, 1
+o32 cmp ax, 1
+
+cmp eax, 1
+o16 cmp eax, 1
+o32 cmp eax, 1
+
+BITS 64
+cmp ax, 1
+o16 cmp ax, 1
+o32 cmp ax, 1
+
+cmp eax, 1
+o16 cmp eax, 1
+o32 cmp eax, 1
diff --git a/test/sreg.asm b/test/sreg.asm
new file mode 100644
index 00000000..11449a50
--- /dev/null
+++ b/test/sreg.asm
@@ -0,0 +1,65 @@
+ bits 64
+ mov es,rax
+ mov ss,rax
+ mov ds,rax
+ mov fs,rax
+ mov gs,rax
+ mov es,eax
+ mov ss,eax
+ mov ds,eax
+ mov fs,eax
+ mov gs,eax
+ mov es,ax
+ mov ss,ax
+ mov ds,ax
+ mov fs,ax
+ mov gs,ax
+ mov es,[rsi]
+ mov ss,[rsi]
+ mov ds,[rsi]
+ mov fs,[rsi]
+ mov gs,[rsi]
+ mov es,word [rsi]
+ mov ss,word [rsi]
+ mov ds,word [rsi]
+ mov fs,word [rsi]
+ mov gs,word [rsi]
+ mov es,qword [rsi]
+ mov ss,qword [rsi]
+ mov ds,qword [rsi]
+ mov fs,qword [rsi]
+ mov gs,qword [rsi]
+ mov rax,es
+ mov rax,cs
+ mov rax,ss
+ mov rax,ds
+ mov rax,fs
+ mov rax,gs
+ mov eax,es
+ mov eax,ss
+ mov eax,ds
+ mov eax,fs
+ mov eax,fs
+ mov ax,es
+ mov ax,ss
+ mov ax,ds
+ mov ax,fs
+ mov ax,gs
+ mov [rdi],es
+ mov [rdi],cs
+ mov [rdi],ss
+ mov [rdi],ds
+ mov [rdi],fs
+ mov [rdi],gs
+ mov word [rdi],es
+ mov word [rdi],cs
+ mov word [rdi],ss
+ mov word [rdi],ds
+ mov word [rdi],fs
+ mov word [rdi],gs
+ mov qword [rdi],es
+ mov qword [rdi],cs
+ mov qword [rdi],ss
+ mov qword [rdi],ds
+ mov qword [rdi],fs
+ mov qword [rdi],gs