From: Hans-Peter Nilsson Date: Mon, 4 Feb 2002 04:38:53 +0000 (+0000) Subject: * ld-mmix/bpo-18.d, ld-mmix/bpo64addr.ld, ld-mmix/bpo-18m.d, X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a27be4d5bfc65cc9b586a94c2e7fb4b36542cbe7;p=binutils-gdb.git * 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. --- diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 4e96f9d33e5..e41633906fc 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2002-02-04 Hans-Peter Nilsson + + * 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 * 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 00000000000..a4d1c12d4f1 --- /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 00000000000..90e7f3415ee --- /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 00000000000..d6d82875d4d --- /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 00000000000..5c0ddf224bf --- /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 00000000000..7f740e171b4 --- /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 00000000000..f05edfb572a --- /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 00000000000..91126b4856d --- /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 00000000000..a608c687c73 --- /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 00000000000..0324aa53ffe --- /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); } +}