diff options
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-mips-elf/jalr4-r6.dd | 25 | ||||
-rw-r--r-- | ld/testsuite/ld-mips-elf/jalr4.dd | 10 | ||||
-rw-r--r-- | ld/testsuite/ld-mips-elf/mips-elf.exp | 11 |
4 files changed, 51 insertions, 2 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index a4f2406..ceee695 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,10 @@ +2017-02-28 Maciej W. Rozycki <macro@imgtec.com> + + * testsuite/ld-mips-elf/jalr4.dd: Adjust for `jalr $0, $25' + instructions. + * testsuite/ld-mips-elf/jalr4-r6.dd: New test. + * testsuite/ld-mips-elf/mips-elf.exp: Run the new test. + 2017-02-27 Georg-Johann Lay <gjl@gcc.gnu.org> PR target/20849 diff --git a/ld/testsuite/ld-mips-elf/jalr4-r6.dd b/ld/testsuite/ld-mips-elf/jalr4-r6.dd new file mode 100644 index 0000000..f587513 --- /dev/null +++ b/ld/testsuite/ld-mips-elf/jalr4-r6.dd @@ -0,0 +1,25 @@ +.*: +file format .*mips.* + +Disassembly of section \.text: +[0-9a-f]+ <[^>]*> 04110017 bal 0+000060 <bar0> +[0-9a-f]+ <[^>]*> 00000000 nop +[0-9a-f]+ <[^>]*> 10000015 b 0+000060 <bar0> +[0-9a-f]+ <[^>]*> 00000000 nop +[0-9a-f]+ <[^>]*> 10000013 b 0+000060 <bar0> +[0-9a-f]+ <[^>]*> 00000000 nop +[0-9a-f]+ <[^>]*> 0320f809 jalr t9 +[0-9a-f]+ <[^>]*> 00000000 nop +[0-9a-f]+ <[^>]*> 03200009 jr t9 +[0-9a-f]+ <[^>]*> 00000000 nop +[0-9a-f]+ <[^>]*> 03200009 jr t9 +[0-9a-f]+ <[^>]*> 00000000 nop +[0-9a-f]+ <[^>]*> 0320f809 jalr t9 +[0-9a-f]+ <[^>]*> 00000000 nop +[0-9a-f]+ <[^>]*> 03200009 jr t9 +[0-9a-f]+ <[^>]*> 00000000 nop +[0-9a-f]+ <[^>]*> 03200009 jr t9 +[0-9a-f]+ <[^>]*> 00000000 nop + \.\.\. + \.\.\. + \.\.\. + \.\.\. diff --git a/ld/testsuite/ld-mips-elf/jalr4.dd b/ld/testsuite/ld-mips-elf/jalr4.dd index 8e41756..56ee094 100644 --- a/ld/testsuite/ld-mips-elf/jalr4.dd +++ b/ld/testsuite/ld-mips-elf/jalr4.dd @@ -1,16 +1,22 @@ .*: +file format .*mips.* Disassembly of section \.text: -[0-9a-f]+ <[^>]*> 0411000f bal 0+000040 <bar0> +[0-9a-f]+ <[^>]*> 04110017 bal 0+000060 <bar0> [0-9a-f]+ <[^>]*> 00000000 nop -[0-9a-f]+ <[^>]*> 1000000d b 0+000040 <bar0> +[0-9a-f]+ <[^>]*> 10000015 b 0+000060 <bar0> +[0-9a-f]+ <[^>]*> 00000000 nop +[0-9a-f]+ <[^>]*> 10000013 b 0+000060 <bar0> [0-9a-f]+ <[^>]*> 00000000 nop [0-9a-f]+ <[^>]*> 0320f809 jalr t9 [0-9a-f]+ <[^>]*> 00000000 nop +[0-9a-f]+ <[^>]*> 03200009 jalr zero,t9 +[0-9a-f]+ <[^>]*> 00000000 nop [0-9a-f]+ <[^>]*> 03200008 jr t9 [0-9a-f]+ <[^>]*> 00000000 nop [0-9a-f]+ <[^>]*> 0320f809 jalr t9 [0-9a-f]+ <[^>]*> 00000000 nop +[0-9a-f]+ <[^>]*> 03200009 jalr zero,t9 +[0-9a-f]+ <[^>]*> 00000000 nop [0-9a-f]+ <[^>]*> 03200008 jr t9 [0-9a-f]+ <[^>]*> 00000000 nop \.\.\. diff --git a/ld/testsuite/ld-mips-elf/mips-elf.exp b/ld/testsuite/ld-mips-elf/mips-elf.exp index dab0e0f..73d5969 100644 --- a/ld/testsuite/ld-mips-elf/mips-elf.exp +++ b/ld/testsuite/ld-mips-elf/mips-elf.exp @@ -1006,6 +1006,17 @@ foreach { abi } $abis { "$abi_asflags($abi)" \ [list ../../../gas/testsuite/gas/mips/jalr4.s] \ [list "objdump {-d --prefix-addresses --show-raw-insn} jalr4.dd"] \ + "jalr4-${abi}"] \ + [list \ + "MIPSr6 JALR reloc unaligned/cross-mode link test ($abi)" \ + "$abi_ldflags($abi) -T jalr3.ld" "" \ + [string map \ + [list -32 "-mips32r6 -32" \ + -n32 "-mips64r6 -n32" \ + -64 "-mips64r6 -64"] \ + [regsub -- -march=from-abi $abi_asflags($abi) ""]] \ + {../../../gas/testsuite/gas/mips/jalr4.s} \ + {{objdump {-d --prefix-addresses --show-raw-insn} jalr4-r6.dd}} \ "jalr4-${abi}"]] } |