aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorH. Peter Anvin (Intel) <hpa@zytor.com>2019-04-24 11:14:43 -0700
committerH. Peter Anvin (Intel) <hpa@zytor.com>2019-04-24 11:14:43 -0700
commit9bb55bd1276822565f111f0bb347024b7e08df5b (patch)
tree4582a8ab5ea1dbbe5fc60484fc9518a426b29797 /test
parent982186a1a3139763f2aa2710b32236009f64270d (diff)
parent8b262474424c0f6912b22bbf7452f26bfa4d1235 (diff)
downloadnasm-9bb55bd1276822565f111f0bb347024b7e08df5b.tar.gz
nasm-9bb55bd1276822565f111f0bb347024b7e08df5b.tar.xz
nasm-9bb55bd1276822565f111f0bb347024b7e08df5b.zip
Merge branch 'evalmacro'
Resolved Conflicts: asm/preproc.c output/elf.h output/outelf.c output/outelf.h version Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Diffstat (limited to 'test')
-rw-r--r--test/evalmacro.asm4
-rw-r--r--test/fewsecs.asm2
-rw-r--r--test/manysecs.asm15
-rw-r--r--test/moresecs.asm3
-rw-r--r--test/mostsecs.asm3
5 files changed, 27 insertions, 0 deletions
diff --git a/test/evalmacro.asm b/test/evalmacro.asm
new file mode 100644
index 00000000..0dd668dd
--- /dev/null
+++ b/test/evalmacro.asm
@@ -0,0 +1,4 @@
+%define tonum(=x) x
+
+ dd tonum(1+3)
+ dd tonum(5*7)
diff --git a/test/fewsecs.asm b/test/fewsecs.asm
new file mode 100644
index 00000000..85731acf
--- /dev/null
+++ b/test/fewsecs.asm
@@ -0,0 +1,2 @@
+%assign NSECS 64
+%include "manysecs.asm"
diff --git a/test/manysecs.asm b/test/manysecs.asm
new file mode 100644
index 00000000..49799453
--- /dev/null
+++ b/test/manysecs.asm
@@ -0,0 +1,15 @@
+%ifndef NSECS
+ %assign NSECS 16384
+%endif
+
+%assign NSECS ((NSECS+3) & ~3)
+
+%assign n 0
+%rep NSECS
+ %assign gcom (n & ~3) + 2
+ section .text %+ n progbits exec
+start_ %+ n:
+ nop
+ jmp start_ %+ gcom
+ %assign n n+1
+%endrep
diff --git a/test/moresecs.asm b/test/moresecs.asm
new file mode 100644
index 00000000..78d9887b
--- /dev/null
+++ b/test/moresecs.asm
@@ -0,0 +1,3 @@
+; Less than 65,279 data sections, but more total sections
+%assign NSECS 37600
+%include "manysecs.asm"
diff --git a/test/mostsecs.asm b/test/mostsecs.asm
new file mode 100644
index 00000000..0b91816a
--- /dev/null
+++ b/test/mostsecs.asm
@@ -0,0 +1,3 @@
+; More than 65,279 data sections
+%assign NSECS 131072
+%include "manysecs.asm"