* 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.
This commit is contained in:
Hans-Peter Nilsson 2002-02-04 04:38:53 +00:00
parent 5459d7a081
commit a27be4d5bf
10 changed files with 181 additions and 0 deletions

View file

@ -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.

View file

@ -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

View file

@ -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:

View file

@ -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 .*

View file

@ -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 .*

View file

@ -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 .*

View file

@ -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).

View file

@ -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).

View file

@ -0,0 +1,5 @@
.set i,0
.rept 223*4
LDA $11,_start+i*64
.set i,i+1
.endr

View file

@ -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); }
}