diff options
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/jalr4-n32.d | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/jalr4-n64.d | 42 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/jalr4.d | 30 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/jalr4.s | 63 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/mips.exp | 8 |
6 files changed, 156 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 415237c..0f46787 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,11 @@ +2017-02-23 Maciej W. Rozycki <macro@imgtec.com> + + * testsuite/gas/mips/jalr4.d: New test. + * testsuite/gas/mips/jalr4-n32.d: New test. + * testsuite/gas/mips/jalr4-n64.d: New test. + * testsuite/gas/mips/jalr4.s: New test source. + * testsuite/gas/mips/mips.exp: Run the new tests. + 2017-02-23 Sheldon Lobo <sheldon.lobo@oracle.com> Add support for associating SPARC ASIs with an architecture level. diff --git a/gas/testsuite/gas/mips/jalr4-n32.d b/gas/testsuite/gas/mips/jalr4-n32.d new file mode 100644 index 0000000..fde29f5 --- /dev/null +++ b/gas/testsuite/gas/mips/jalr4-n32.d @@ -0,0 +1,5 @@ +#objdump: -dr --prefix-addresses --show-raw-insn +#name: MIPS JALR reloc unaligned/cross-mode (n32) +#as: -n32 +#source: jalr4.s +#dump: jalr4.d diff --git a/gas/testsuite/gas/mips/jalr4-n64.d b/gas/testsuite/gas/mips/jalr4-n64.d new file mode 100644 index 0000000..b61fc23 --- /dev/null +++ b/gas/testsuite/gas/mips/jalr4-n64.d @@ -0,0 +1,42 @@ +#objdump: -dr --prefix-addresses --show-raw-insn +#name: MIPS JALR reloc unaligned/cross-mode (n64) +#as: -64 +#source: jalr4.s + +.*: +file format .*mips.* + +Disassembly of section \.text: +[0-9a-f]+ <[^>]*> 0320f809 jalr t9 +[ ]*[0-9a-f]+: R_MIPS_JALR bar0 +[ ]*[0-9a-f]+: R_MIPS_NONE \*ABS\* +[ ]*[0-9a-f]+: R_MIPS_NONE \*ABS\* +[0-9a-f]+ <[^>]*> 00000000 nop +[0-9a-f]+ <[^>]*> 0320000[89] jr t9 +[ ]*[0-9a-f]+: R_MIPS_JALR bar0 +[ ]*[0-9a-f]+: R_MIPS_NONE \*ABS\* +[ ]*[0-9a-f]+: R_MIPS_NONE \*ABS\* +[0-9a-f]+ <[^>]*> 00000000 nop +[0-9a-f]+ <[^>]*> 0320f809 jalr t9 +[ ]*[0-9a-f]+: R_MIPS_JALR bar1 +[ ]*[0-9a-f]+: R_MIPS_NONE \*ABS\* +[ ]*[0-9a-f]+: R_MIPS_NONE \*ABS\* +[0-9a-f]+ <[^>]*> 00000000 nop +[0-9a-f]+ <[^>]*> 0320000[89] jr t9 +[ ]*[0-9a-f]+: R_MIPS_JALR bar1 +[ ]*[0-9a-f]+: R_MIPS_NONE \*ABS\* +[ ]*[0-9a-f]+: R_MIPS_NONE \*ABS\* +[0-9a-f]+ <[^>]*> 00000000 nop +[0-9a-f]+ <[^>]*> 0320f809 jalr t9 +[ ]*[0-9a-f]+: R_MIPS_JALR bar2 +[ ]*[0-9a-f]+: R_MIPS_NONE \*ABS\* +[ ]*[0-9a-f]+: R_MIPS_NONE \*ABS\* +[0-9a-f]+ <[^>]*> 00000000 nop +[0-9a-f]+ <[^>]*> 0320000[89] jr t9 +[ ]*[0-9a-f]+: R_MIPS_JALR bar2 +[ ]*[0-9a-f]+: R_MIPS_NONE \*ABS\* +[ ]*[0-9a-f]+: R_MIPS_NONE \*ABS\* +[0-9a-f]+ <[^>]*> 00000000 nop + \.\.\. + \.\.\. + \.\.\. + \.\.\. diff --git a/gas/testsuite/gas/mips/jalr4.d b/gas/testsuite/gas/mips/jalr4.d new file mode 100644 index 0000000..1a1afdd --- /dev/null +++ b/gas/testsuite/gas/mips/jalr4.d @@ -0,0 +1,30 @@ +#objdump: -dr --prefix-addresses --show-raw-insn +#name: MIPS JALR reloc unaligned/cross-mode (o32) +#as: -32 +#source: jalr4.s + +.*: +file format .*mips.* + +Disassembly of section \.text: +[0-9a-f]+ <[^>]*> 0320f809 jalr t9 +[ ]*[0-9a-f]+: R_MIPS_JALR bar0 +[0-9a-f]+ <[^>]*> 00000000 nop +[0-9a-f]+ <[^>]*> 0320000[89] jr t9 +[ ]*[0-9a-f]+: R_MIPS_JALR bar0 +[0-9a-f]+ <[^>]*> 00000000 nop +[0-9a-f]+ <[^>]*> 0320f809 jalr t9 +[ ]*[0-9a-f]+: R_MIPS_JALR bar1 +[0-9a-f]+ <[^>]*> 00000000 nop +[0-9a-f]+ <[^>]*> 0320000[89] jr t9 +[ ]*[0-9a-f]+: R_MIPS_JALR bar1 +[0-9a-f]+ <[^>]*> 00000000 nop +[0-9a-f]+ <[^>]*> 0320f809 jalr t9 +[ ]*[0-9a-f]+: R_MIPS_JALR bar2 +[0-9a-f]+ <[^>]*> 00000000 nop +[0-9a-f]+ <[^>]*> 0320000[89] jr t9 +[ ]*[0-9a-f]+: R_MIPS_JALR bar2 +[0-9a-f]+ <[^>]*> 00000000 nop + \.\.\. + \.\.\. + \.\.\. + \.\.\. diff --git a/gas/testsuite/gas/mips/jalr4.s b/gas/testsuite/gas/mips/jalr4.s new file mode 100644 index 0000000..4ad6f26 --- /dev/null +++ b/gas/testsuite/gas/mips/jalr4.s @@ -0,0 +1,63 @@ + .abicalls + .text + + .align 2 + .globl foo + .ent foo +foo: + .reloc 1f, R_MIPS_JALR, bar0 +1: jalr $25 + .reloc 1f, R_MIPS_JALR, bar0 +1: jr $25 + .reloc 1f, R_MIPS_JALR, bar1 +1: jalr $25 + .reloc 1f, R_MIPS_JALR, bar1 +1: jr $25 + .reloc 1f, R_MIPS_JALR, bar2 +1: jalr $25 + .reloc 1f, R_MIPS_JALR, bar2 +1: jr $25 + .end foo + +# Force some (non-delay-slot) zero bytes, to make 'objdump' print ... + .align 4, 0 + .space 16 + + .align 2 + .globl bar0 + .ent bar0 +bar0: + .insn + .end bar0 + +# Force some (non-delay-slot) zero bytes, to make 'objdump' print ... + .align 4, 0 + .space 16 + + .align 2 + .globl bar1 + .ent bar1 + .space 2 +bar1: + .insn + .end bar1 + +# Force some (non-delay-slot) zero bytes, to make 'objdump' print ... + .align 4, 0 + .space 16 + + .set mips64r2 + .set mips16 + .align 2 + .globl bar2 + .ent bar2 + .byte 0 +bar2: + .insn + .end bar2 + .set nomips16 + .set mips0 + +# Force some (non-delay-slot) zero bytes, to make 'objdump' print ... + .align 4, 0 + .space 16 diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp index bef7106..591af50 100644 --- a/gas/testsuite/gas/mips/mips.exp +++ b/gas/testsuite/gas/mips/mips.exp @@ -1182,13 +1182,21 @@ if { [istarget mips*-*-vxworks*] } { run_dump_test "jalr2" run_dump_test_arches "jalr3" [mips_arch_list_matching mips1 \ !micromips] + run_dump_test_arches "jalr4" [mips_arch_list_matching mips1 \ + !micromips] if $has_newabi { run_dump_test_arches "jalr3-n32" \ [mips_arch_list_matching mips3 \ !micromips] + run_dump_test_arches "jalr4-n32" \ + [mips_arch_list_matching mips3 \ + !micromips] run_dump_test_arches "jalr3-n64" \ [mips_arch_list_matching mips3 \ !micromips] + run_dump_test_arches "jalr4-n64" \ + [mips_arch_list_matching mips3 \ + !micromips] } run_dump_test_arches "aent" [mips_arch_list_matching mips1] |