aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2002-02-04 04:38:53 +0000
committerHans-Peter Nilsson <hp@axis.com>2002-02-04 04:38:53 +0000
commita27be4d5bfc65cc9b586a94c2e7fb4b36542cbe7 (patch)
tree14ce1bf500ddd16ea9a5e5838223518fc6094c73 /ld/testsuite
parent5459d7a0810702e172a7d51dae046285757d7d88 (diff)
downloadgdb-a27be4d5bfc65cc9b586a94c2e7fb4b36542cbe7.zip
gdb-a27be4d5bfc65cc9b586a94c2e7fb4b36542cbe7.tar.gz
gdb-a27be4d5bfc65cc9b586a94c2e7fb4b36542cbe7.tar.bz2
* ld-mmix/bpo-18.d, ld-mmix/bpo64addr.ld, ld-mmix/bpo-18m.d,
ld-mmix/bpo-9.s, ld-mmix/bpo-19.d, ld-mmix/bpo-19m.d, ld-mmix/bpo-10.s, ld-mmix/bpo-20.d, ld-mmix/bpo-20m.d: New tests for on-demand global register allocation.
Diffstat (limited to 'ld/testsuite')
-rw-r--r--ld/testsuite/ChangeLog7
-rw-r--r--ld/testsuite/ld-mmix/bpo-10.s6
-rw-r--r--ld/testsuite/ld-mmix/bpo-18.d35
-rw-r--r--ld/testsuite/ld-mmix/bpo-18m.d25
-rw-r--r--ld/testsuite/ld-mmix/bpo-19.d44
-rw-r--r--ld/testsuite/ld-mmix/bpo-19m.d30
-rw-r--r--ld/testsuite/ld-mmix/bpo-20.d8
-rw-r--r--ld/testsuite/ld-mmix/bpo-20m.d8
-rw-r--r--ld/testsuite/ld-mmix/bpo-9.s5
-rw-r--r--ld/testsuite/ld-mmix/bpo64addr.ld13
10 files changed, 181 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 4e96f9d..e416339 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * ld-mmix/bpo-18.d, ld-mmix/bpo64addr.ld, ld-mmix/bpo-18m.d,
+ ld-mmix/bpo-9.s, ld-mmix/bpo-19.d, ld-mmix/bpo-19m.d,
+ ld-mmix/bpo-10.s, ld-mmix/bpo-20.d, ld-mmix/bpo-20m.d: New tests
+ for on-demand global register allocation.
+
2002-02-02 Alexandre Oliva <aoliva@redhat.com>
* ld-sh/shared-1.d: Fix incorrect offsets.
diff --git a/ld/testsuite/ld-mmix/bpo-10.s b/ld/testsuite/ld-mmix/bpo-10.s
new file mode 100644
index 0000000..a4d1c12
--- /dev/null
+++ b/ld/testsuite/ld-mmix/bpo-10.s
@@ -0,0 +1,6 @@
+# Overflow; specify 223*8 registers.
+ .set i,0
+ .rept 223*4*8
+ LDA $11,_start+i*64
+ .set i,i+1
+ .endr
diff --git a/ld/testsuite/ld-mmix/bpo-18.d b/ld/testsuite/ld-mmix/bpo-18.d
new file mode 100644
index 0000000..90e7f34
--- /dev/null
+++ b/ld/testsuite/ld-mmix/bpo-18.d
@@ -0,0 +1,35 @@
+#source: start.s
+#source: bpo-1.s
+#source: bpo-2.s
+#source: bpo-5.s
+#source: bpo-6.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix -T$srcdir/$subdir/bpo64addr.ld
+#objdump: -st
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+100 l d \.text 0+
+4000000000001060 l d \.text\.away 0+
+0+7e0 l d \.MMIX\.reg_contents 0+
+4000000000001088 l d \.data 0+
+4000000000001088 l d \.bss 0+
+0+ l d \*ABS\* 0+
+0+ l d \*ABS\* 0+
+0+ l d \*ABS\* 0+
+4000000000001064 l \.text\.away 0+ x
+0+100 g \.text 0+ x
+4000000000001060 g O \.text\.away 0+ Main
+0+104 g \.text 0+ x2
+4000000000001060 g \.text\.away 0+ _start
+4000000000001068 g \.text\.away 0+ y
+
+Contents of section \.text:
+ 0100 232dfc00 232dfd00 .*
+Contents of section \.text\.away:
+ 1060 e3fd0001 232afe1e 2321fe00 .*
+Contents of section \.MMIX\.reg_contents:
+ 07e0 00000000 00001168 00000000 0000a514 .*
+ 07f0 40000000 00001070 .*
+Contents of section \.data:
diff --git a/ld/testsuite/ld-mmix/bpo-18m.d b/ld/testsuite/ld-mmix/bpo-18m.d
new file mode 100644
index 0000000..d6d82875
--- /dev/null
+++ b/ld/testsuite/ld-mmix/bpo-18m.d
@@ -0,0 +1,25 @@
+#source: start.s
+#source: bpo-1.s
+#source: bpo-2.s
+#source: bpo-5.s
+#source: bpo-6.s
+#as: -linker-allocated-gregs
+#ld: -m mmo -T$srcdir/$subdir/bpo64addr.ld
+#objdump: -st
+
+.*: file format mmo
+
+SYMBOL TABLE:
+4000000000001060 g \*ABS\* Main
+0+100 g \.text x
+0+104 g \.text x2
+4000000000001060 g \*ABS\* _start
+4000000000001068 g \*ABS\* y
+
+Contents of section \.text:
+ 0100 232dfc00 232dfd00 .*
+Contents of section \.text\.away:
+ 1060 e3fd0001 232afe1e 2321fe00 .*
+Contents of section \.MMIX\.reg_contents:
+ 07e0 00000000 00001168 00000000 0000a514 .*
+ 07f0 40000000 00001070 .*
diff --git a/ld/testsuite/ld-mmix/bpo-19.d b/ld/testsuite/ld-mmix/bpo-19.d
new file mode 100644
index 0000000..5c0ddf2
--- /dev/null
+++ b/ld/testsuite/ld-mmix/bpo-19.d
@@ -0,0 +1,44 @@
+#source: start.s
+#source: bpo-9.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix
+#objdump: -st
+
+# 223 (max) linker-allocated GREGs, four relocs merged for each register
+# allocated.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+ l d \.text 0+
+2000000000000000 l d \.data 0+
+2000000000000000 l d \.sbss 0+
+2000000000000000 l d \.bss 0+
+0+100 l d \.MMIX\.reg_contents 0+
+0+ l d \*ABS\* 0+
+0+ l d \*ABS\* 0+
+0+ l d \*ABS\* 0+
+0+37c l \*ABS\* 0+ i
+0+ g \.text 0+ _start
+2000000000000000 g O \*ABS\* 0+ __bss_start
+2000000000000000 g O \*ABS\* 0+ _edata
+2000000000000000 g O \*ABS\* 0+ _end
+0+ g O \.text 0+ _start\.
+
+Contents of section \.text:
+ 0000 e3fd0001 230b2000 230b2040 230b2080 .*
+ 0010 230b20c0 230b2100 230b2140 230b2180 .*
+ 0020 230b21c0 230b2200 230b2240 230b2280 .*
+#...
+ 0dd0 230bfcc0 230bfd00 230bfd40 230bfd80 .*
+ 0de0 230bfdc0 230bfe00 230bfe40 230bfe80 .*
+ 0df0 230bfec0 .*
+Contents of section \.data:
+Contents of section \.sbss:
+Contents of section \.MMIX\.reg_contents:
+ 0100 00000000 00000000 00000000 00000100 .*
+ 0110 00000000 00000200 00000000 00000300 .*
+#...
+ 07d0 00000000 0000da00 00000000 0000db00 .*
+ 07e0 00000000 0000dc00 00000000 0000dd00 .*
+ 07f0 00000000 0000de00 .*
diff --git a/ld/testsuite/ld-mmix/bpo-19m.d b/ld/testsuite/ld-mmix/bpo-19m.d
new file mode 100644
index 0000000..7f740e1
--- /dev/null
+++ b/ld/testsuite/ld-mmix/bpo-19m.d
@@ -0,0 +1,30 @@
+#source: start.s
+#source: bpo-9.s
+#as: -linker-allocated-gregs
+#ld: -m mmo
+#objdump: -st
+
+# 223 (max) linker-allocated GREGs, four relocs merged for each register
+# allocated.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+ g \.text Main
+0+ g \.text _start
+
+Contents of section \.text:
+ 0000 e3fd0001 230b2000 230b2040 230b2080 .*
+ 0010 230b20c0 230b2100 230b2140 230b2180 .*
+ 0020 230b21c0 230b2200 230b2240 230b2280 .*
+#...
+ 0dd0 230bfcc0 230bfd00 230bfd40 230bfd80 .*
+ 0de0 230bfdc0 230bfe00 230bfe40 230bfe80 .*
+ 0df0 230bfec0 .*
+Contents of section \.MMIX\.reg_contents:
+ 0100 00000000 00000000 00000000 00000100 .*
+ 0110 00000000 00000200 00000000 00000300 .*
+#...
+ 07d0 00000000 0000da00 00000000 0000db00 .*
+ 07e0 00000000 0000dc00 00000000 0000dd00 .*
+ 07f0 00000000 0000de00 .*
diff --git a/ld/testsuite/ld-mmix/bpo-20.d b/ld/testsuite/ld-mmix/bpo-20.d
new file mode 100644
index 0000000..f05edfb
--- /dev/null
+++ b/ld/testsuite/ld-mmix/bpo-20.d
@@ -0,0 +1,8 @@
+#source: start.s
+#source: bpo-10.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix
+#error: Too many global registers
+
+# Check that many too many gregs are recognized (and not signed/unsigned
+# bugs with checks for < 32 appear).
diff --git a/ld/testsuite/ld-mmix/bpo-20m.d b/ld/testsuite/ld-mmix/bpo-20m.d
new file mode 100644
index 0000000..91126b4
--- /dev/null
+++ b/ld/testsuite/ld-mmix/bpo-20m.d
@@ -0,0 +1,8 @@
+#source: start.s
+#source: bpo-10.s
+#as: -linker-allocated-gregs
+#ld: -m mmo
+#error: Too many global registers
+
+# Check that many too many gregs are recognized (and not signed/unsigned
+# bugs with checks for < 32 appear).
diff --git a/ld/testsuite/ld-mmix/bpo-9.s b/ld/testsuite/ld-mmix/bpo-9.s
new file mode 100644
index 0000000..a608c68
--- /dev/null
+++ b/ld/testsuite/ld-mmix/bpo-9.s
@@ -0,0 +1,5 @@
+ .set i,0
+ .rept 223*4
+ LDA $11,_start+i*64
+ .set i,i+1
+ .endr
diff --git a/ld/testsuite/ld-mmix/bpo64addr.ld b/ld/testsuite/ld-mmix/bpo64addr.ld
new file mode 100644
index 0000000..0324aa5
--- /dev/null
+++ b/ld/testsuite/ld-mmix/bpo64addr.ld
@@ -0,0 +1,13 @@
+OUTPUT_ARCH(mmix)
+ENTRY(Main)
+SECTIONS
+{
+ .text 0x100 :
+ { *(.text.x); *(.text.x2); }
+
+ .text.away 0x4000000000001060 :
+ { *(.text); Main = _start; }
+
+ .MMIX.reg_contents :
+ { *(.MMIX.reg_contents.linker_allocated); *(.MMIX.reg_contents); }
+}