summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-10-23 23:13:44 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-10-23 23:13:44 -0700
commit912595dfc05d76304251fe748053f1b095db37ac (patch)
tree1049db775c98ea920ef62189c8458a2d688c0b64 /test
parent33d5fc074f05fbed581497743050a412f65d0b3a (diff)
parent207b1c4d3d314d6349e09ba829db732165288de0 (diff)
downloadnasm-912595dfc05d76304251fe748053f1b095db37ac.tar.gz
nasm-912595dfc05d76304251fe748053f1b095db37ac.tar.bz2
nasm-912595dfc05d76304251fe748053f1b095db37ac.zip
Merge branch 'indirect'
Diffstat (limited to 'test')
-rw-r--r--test/ppindirect.asm42
-rw-r--r--test/smartalign.asm34
-rw-r--r--test/smartalign16.asm36
-rw-r--r--test/smartalign32.asm36
-rw-r--r--test/smartalign64.asm36
5 files changed, 150 insertions, 34 deletions
diff --git a/test/ppindirect.asm b/test/ppindirect.asm
new file mode 100644
index 0000000..0a30d07
--- /dev/null
+++ b/test/ppindirect.asm
@@ -0,0 +1,42 @@
+;Testname=test; Arguments=-E -o ppindirect.out; Files=ppindirect.out
+
+; Fun tests of the preprocessor indirection mode...
+
+%assign foo1 11
+%assign foo11 1111
+%assign foo2 22
+%assign foo22 2222
+%assign foo3 33
+%assign foo33 3333
+%assign n 2
+foo%[foo%[n]]*100
+foo%[n]*100
+%assign foo%[foo%[n]] foo%[foo%[n]]*100
+;%assign foo%[n] foo%[n]*100
+
+ foo1
+ foo2
+ foo3
+ foo11
+ foo22
+ foo33
+
+%define foo33bar 999999
+ %[foo%[foo3]bar]
+
+%assign bctr 0
+%macro bluttan 0
+%assign bctr bctr+1
+%assign bluttan%[bctr] bctr
+%defstr bstr bluttan%[bctr]
+ bluttan%[bctr]
+ bstr
+%endmacro
+
+%rep 20
+ bluttan
+%endrep
+%rep 20
+ bluttan%[bctr]
+%assign bctr bctr-1
+%endrep
diff --git a/test/smartalign.asm b/test/smartalign.asm
deleted file mode 100644
index 1b8bdae..0000000
--- a/test/smartalign.asm
+++ /dev/null
@@ -1,34 +0,0 @@
-%use smartalign
-
- bits 32
-
- alignmode nop
- add ax,ax
- align 16
-
- alignmode generic
- add ax,ax
- align 16
-
- alignmode k7
- add ax,ax
- align 16
-
- alignmode k8
- add ax,ax
- align 16
-
- alignmode p6
- add ax,ax
- align 16
-
- add ecx,ecx
- align 32
- add edx,edx
- align 128
- add ebx,ebx
- align 256
- add esi,esi
- align 512
-
- add edi,edi
diff --git a/test/smartalign16.asm b/test/smartalign16.asm
new file mode 100644
index 0000000..42915de
--- /dev/null
+++ b/test/smartalign16.asm
@@ -0,0 +1,36 @@
+;Testname=test; Arguments=-fbin -osmartalign16.bin; Files=stdout stderr smartalign16.bin
+
+%use smartalign
+
+ bits 16
+
+ alignmode nop, 32
+ add ax,ax
+ align 32
+
+ alignmode generic, 32
+ add ax,ax
+ align 32
+
+ alignmode k7, 32
+ add ax,ax
+ align 32
+
+ alignmode k8, 32
+ add ax,ax
+ align 32
+
+ alignmode p6, 32
+ add ax,ax
+ align 32
+
+ add ecx,ecx
+ align 32
+ add edx,edx
+ align 128
+ add ebx,ebx
+ align 256
+ add esi,esi
+ align 512
+
+ add edi,edi
diff --git a/test/smartalign32.asm b/test/smartalign32.asm
new file mode 100644
index 0000000..64d65b0
--- /dev/null
+++ b/test/smartalign32.asm
@@ -0,0 +1,36 @@
+;Testname=test; Arguments=-fbin -osmartalign32.bin; Files=stdout stderr smartalign32.bin
+
+%use smartalign
+
+ bits 32
+
+ alignmode nop, 32
+ add ax,ax
+ align 32
+
+ alignmode generic, 32
+ add ax,ax
+ align 32
+
+ alignmode k7, 32
+ add ax,ax
+ align 32
+
+ alignmode k8, 32
+ add ax,ax
+ align 32
+
+ alignmode p6, 32
+ add ax,ax
+ align 32
+
+ add ecx,ecx
+ align 32
+ add edx,edx
+ align 128
+ add ebx,ebx
+ align 256
+ add esi,esi
+ align 512
+
+ add edi,edi
diff --git a/test/smartalign64.asm b/test/smartalign64.asm
new file mode 100644
index 0000000..74454ca
--- /dev/null
+++ b/test/smartalign64.asm
@@ -0,0 +1,36 @@
+;Testname=test; Arguments=-fbin -osmartalign64.bin; Files=stdout stderr smartalign64.bin
+
+%use smartalign
+
+ bits 64
+
+ alignmode nop, 32
+ add ax,ax
+ align 32
+
+ alignmode generic, 32
+ add ax,ax
+ align 32
+
+ alignmode k7, 32
+ add ax,ax
+ align 32
+
+ alignmode k8, 32
+ add ax,ax
+ align 32
+
+ alignmode p6, 32
+ add ax,ax
+ align 32
+
+ add ecx,ecx
+ align 32
+ add edx,edx
+ align 128
+ add ebx,ebx
+ align 256
+ add esi,esi
+ align 512
+
+ add edi,edi