From 05e6bb2fc936e70269f11767fd0112518cd4ef96 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Wed, 26 Mar 2003 01:05:44 +0000 Subject: * ld-mips-elf/mips-elf.exp: Added... * ld-mips-elf/relax-jalr.s, ld-mips-elf/relax-jalr-n32.d, ld-mips-elf/relax-jalr-n32-shared.d, ld-mips-elf/relax-jalr-n64.d, ld-mips-elf/relax-jalr-n64-shared.d: New tests. --- ld/testsuite/ChangeLog | 7 +++++++ ld/testsuite/ld-mips-elf/mips-elf.exp | 5 +++++ ld/testsuite/ld-mips-elf/relax-jalr-n32-shared.d | 23 ++++++++++++++++++++++ ld/testsuite/ld-mips-elf/relax-jalr-n32.d | 23 ++++++++++++++++++++++ ld/testsuite/ld-mips-elf/relax-jalr-n64-shared.d | 25 ++++++++++++++++++++++++ ld/testsuite/ld-mips-elf/relax-jalr-n64.d | 23 ++++++++++++++++++++++ ld/testsuite/ld-mips-elf/relax-jalr.s | 12 ++++++++++++ 7 files changed, 118 insertions(+) create mode 100644 ld/testsuite/ld-mips-elf/relax-jalr-n32-shared.d create mode 100644 ld/testsuite/ld-mips-elf/relax-jalr-n32.d create mode 100644 ld/testsuite/ld-mips-elf/relax-jalr-n64-shared.d create mode 100644 ld/testsuite/ld-mips-elf/relax-jalr-n64.d create mode 100644 ld/testsuite/ld-mips-elf/relax-jalr.s (limited to 'ld') diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 299ade0..145c3c0 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2003-03-25 Alexandre Oliva + + * ld-mips-elf/mips-elf.exp: Added... + * ld-mips-elf/relax-jalr.s, ld-mips-elf/relax-jalr-n32.d, + ld-mips-elf/relax-jalr-n32-shared.d, ld-mips-elf/relax-jalr-n64.d, + ld-mips-elf/relax-jalr-n64-shared.d: New tests. + 2003-03-11 Alexandre Oliva * ld-mips-elf/mips-elf.exp (linux_gnu): New variable. Add: diff --git a/ld/testsuite/ld-mips-elf/mips-elf.exp b/ld/testsuite/ld-mips-elf/mips-elf.exp index d206bd4..596f777 100644 --- a/ld/testsuite/ld-mips-elf/mips-elf.exp +++ b/ld/testsuite/ld-mips-elf/mips-elf.exp @@ -33,6 +33,11 @@ if { [istarget mips*-*-*] } then { # Test multi-got link. run_dump_test "multi-got-1" + + run_dump_test "relax-jalr-n32" + run_dump_test "relax-jalr-n32-shared" + run_dump_test "relax-jalr-n64" + run_dump_test "relax-jalr-n64-shared" } if { $linux_gnu } { diff --git a/ld/testsuite/ld-mips-elf/relax-jalr-n32-shared.d b/ld/testsuite/ld-mips-elf/relax-jalr-n32-shared.d new file mode 100644 index 0000000..e686685 --- /dev/null +++ b/ld/testsuite/ld-mips-elf/relax-jalr-n32-shared.d @@ -0,0 +1,23 @@ +#name: MIPS relax-jalr-shared n32 +#source: relax-jalr.s +#as: -KPIC -n32 +#objdump: --prefix-addresses -d --show-raw-insn +#ld: --relax -shared -melf32btsmipn32 + +.*: file format elf.*mips.* + +Disassembly of section \.text: + \.\.\. + \.\.\. +.* lw t9,.* +.* jalr t9 +.* nop + \.\.\. +.* lw t9,.* +.* jalr t9 +.* nop + \.\.\. +.* lw t9,.* +.* bal .* <__start> +.* nop + \.\.\. diff --git a/ld/testsuite/ld-mips-elf/relax-jalr-n32.d b/ld/testsuite/ld-mips-elf/relax-jalr-n32.d new file mode 100644 index 0000000..c2f3513 --- /dev/null +++ b/ld/testsuite/ld-mips-elf/relax-jalr-n32.d @@ -0,0 +1,23 @@ +#name: MIPS relax-jalr n32 +#source: relax-jalr.s +#as: -KPIC -n32 +#objdump: --prefix-addresses -d --show-raw-insn +#ld: --relax -melf32btsmipn32 + +.*: file format elf.*mips.* + +Disassembly of section \.text: + \.\.\. + \.\.\. +.* lw t9,.* +.* bal .* <__start> +.* nop + \.\.\. +.* lw t9,.* +.* bal .* <__start> +.* nop + \.\.\. +.* lw t9,.* +.* bal .* <__start> +.* nop +.* nop diff --git a/ld/testsuite/ld-mips-elf/relax-jalr-n64-shared.d b/ld/testsuite/ld-mips-elf/relax-jalr-n64-shared.d new file mode 100644 index 0000000..1097aad --- /dev/null +++ b/ld/testsuite/ld-mips-elf/relax-jalr-n64-shared.d @@ -0,0 +1,25 @@ +#name: MIPS relax-jalr-shared n64 +#source: relax-jalr.s +#as: -KPIC -64 +#objdump: --prefix-addresses -d --show-raw-insn +#ld: --relax -shared -melf64btsmip + +.*: file format elf.*mips.* + +Disassembly of section \.text: + \.\.\. + \.\.\. +.* ld t9,.* +.* jalr t9 +.* nop + \.\.\. +.* ld t9,.* +.* jalr t9 +.* nop + \.\.\. +.* ld t9,.* +.* bal .* <__start> +.* nop +.* nop +Disassembly of section \.MIPS\.stubs: + \.\.\. diff --git a/ld/testsuite/ld-mips-elf/relax-jalr-n64.d b/ld/testsuite/ld-mips-elf/relax-jalr-n64.d new file mode 100644 index 0000000..f435085 --- /dev/null +++ b/ld/testsuite/ld-mips-elf/relax-jalr-n64.d @@ -0,0 +1,23 @@ +#name: MIPS relax-jalr n64 +#source: relax-jalr.s +#as: -KPIC -64 +#objdump: --prefix-addresses -d --show-raw-insn +#ld: --relax -melf64btsmip + +.*: file format elf.*mips.* + +Disassembly of section \.text: + \.\.\. + \.\.\. +.* ld t9,.* +.* bal .* <__start> +.* nop + \.\.\. +.* ld t9,.* +.* bal .* <__start> +.* nop + \.\.\. +.* ld t9,.* +.* bal .* <__start> +.* nop +.* nop diff --git a/ld/testsuite/ld-mips-elf/relax-jalr.s b/ld/testsuite/ld-mips-elf/relax-jalr.s new file mode 100644 index 0000000..b990ad0 --- /dev/null +++ b/ld/testsuite/ld-mips-elf/relax-jalr.s @@ -0,0 +1,12 @@ +.globl __start + .space 8 +.ent __start +__start: +.Lstart: + .space 16 + jal __start + .space 32 + jal __start + .space 64 + jal .Lstart +.end __start -- cgit v1.1