diff options
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 10 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/jalr4-n64.d | 21 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/jalr4.d | 15 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/jalr4.s | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/mipsr6@jalr4-n32.d | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/mipsr6@jalr4-n64.d | 57 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/mipsr6@jalr4.d | 39 |
7 files changed, 147 insertions, 6 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index b2908dc..ec6dbf7 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,13 @@ +2017-02-28 Maciej W. Rozycki <macro@imgtec.com> + + * testsuite/gas/mips/jalr4.s: Add `jalr $0, $25' instructions. + * testsuite/gas/mips/jalr4.d: Adjust accordingly. Remove MIPSr6 + encoding patterns. + * testsuite/gas/mips/jalr4-n64.d: Likewise. + * testsuite/gas/mips/mipsr6@jalr4.d: New test. + * testsuite/gas/mips/mipsr6@jalr4-n32.d: New test. + * testsuite/gas/mips/mipsr6@jalr4-n64.d: New test. + 2017-02-25 Alan Modra <amodra@gmail.com> * testsuite/gas/elf/strtab.s: Don't put directives on first diff --git a/gas/testsuite/gas/mips/jalr4-n64.d b/gas/testsuite/gas/mips/jalr4-n64.d index b61fc23..99a334d 100644 --- a/gas/testsuite/gas/mips/jalr4-n64.d +++ b/gas/testsuite/gas/mips/jalr4-n64.d @@ -11,7 +11,12 @@ Disassembly of section \.text: [ ]*[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]+ <[^>]*> 03200009 jalr zero,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]+ <[^>]*> 03200008 jr t9 [ ]*[0-9a-f]+: R_MIPS_JALR bar0 [ ]*[0-9a-f]+: R_MIPS_NONE \*ABS\* [ ]*[0-9a-f]+: R_MIPS_NONE \*ABS\* @@ -21,7 +26,12 @@ Disassembly of section \.text: [ ]*[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]+ <[^>]*> 03200009 jalr zero,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]+ <[^>]*> 03200008 jr t9 [ ]*[0-9a-f]+: R_MIPS_JALR bar1 [ ]*[0-9a-f]+: R_MIPS_NONE \*ABS\* [ ]*[0-9a-f]+: R_MIPS_NONE \*ABS\* @@ -31,7 +41,12 @@ Disassembly of section \.text: [ ]*[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]+ <[^>]*> 03200009 jalr zero,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]+ <[^>]*> 03200008 jr t9 [ ]*[0-9a-f]+: R_MIPS_JALR bar2 [ ]*[0-9a-f]+: R_MIPS_NONE \*ABS\* [ ]*[0-9a-f]+: R_MIPS_NONE \*ABS\* diff --git a/gas/testsuite/gas/mips/jalr4.d b/gas/testsuite/gas/mips/jalr4.d index 1a1afdd..4cafd41 100644 --- a/gas/testsuite/gas/mips/jalr4.d +++ b/gas/testsuite/gas/mips/jalr4.d @@ -9,19 +9,28 @@ 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]+ <[^>]*> 03200009 jalr zero,t9 +[ ]*[0-9a-f]+: R_MIPS_JALR bar0 +[0-9a-f]+ <[^>]*> 00000000 nop +[0-9a-f]+ <[^>]*> 03200008 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]+ <[^>]*> 03200009 jalr zero,t9 +[ ]*[0-9a-f]+: R_MIPS_JALR bar1 +[0-9a-f]+ <[^>]*> 00000000 nop +[0-9a-f]+ <[^>]*> 03200008 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]+ <[^>]*> 03200009 jalr zero,t9 +[ ]*[0-9a-f]+: R_MIPS_JALR bar2 +[0-9a-f]+ <[^>]*> 00000000 nop +[0-9a-f]+ <[^>]*> 03200008 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 index 4ad6f26..25e8634 100644 --- a/gas/testsuite/gas/mips/jalr4.s +++ b/gas/testsuite/gas/mips/jalr4.s @@ -8,14 +8,20 @@ foo: .reloc 1f, R_MIPS_JALR, bar0 1: jalr $25 .reloc 1f, R_MIPS_JALR, bar0 +1: jalr $0, $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: jalr $0, $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: jalr $0, $25 + .reloc 1f, R_MIPS_JALR, bar2 1: jr $25 .end foo diff --git a/gas/testsuite/gas/mips/mipsr6@jalr4-n32.d b/gas/testsuite/gas/mips/mipsr6@jalr4-n32.d new file mode 100644 index 0000000..0a17cbf --- /dev/null +++ b/gas/testsuite/gas/mips/mipsr6@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: mipsr6@jalr4.d diff --git a/gas/testsuite/gas/mips/mipsr6@jalr4-n64.d b/gas/testsuite/gas/mips/mipsr6@jalr4-n64.d new file mode 100644 index 0000000..b7424d6 --- /dev/null +++ b/gas/testsuite/gas/mips/mipsr6@jalr4-n64.d @@ -0,0 +1,57 @@ +#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]+ <[^>]*> 03200009 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]+ <[^>]*> 03200009 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]+ <[^>]*> 03200009 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]+ <[^>]*> 03200009 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]+ <[^>]*> 03200009 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 +[0-9a-f]+ <[^>]*> 03200009 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/mipsr6@jalr4.d b/gas/testsuite/gas/mips/mipsr6@jalr4.d new file mode 100644 index 0000000..9b49339 --- /dev/null +++ b/gas/testsuite/gas/mips/mipsr6@jalr4.d @@ -0,0 +1,39 @@ +#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]+ <[^>]*> 03200009 jr t9 +[ ]*[0-9a-f]+: R_MIPS_JALR bar0 +[0-9a-f]+ <[^>]*> 00000000 nop +[0-9a-f]+ <[^>]*> 03200009 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]+ <[^>]*> 03200009 jr t9 +[ ]*[0-9a-f]+: R_MIPS_JALR bar1 +[0-9a-f]+ <[^>]*> 00000000 nop +[0-9a-f]+ <[^>]*> 03200009 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]+ <[^>]*> 03200009 jr t9 +[ ]*[0-9a-f]+: R_MIPS_JALR bar2 +[0-9a-f]+ <[^>]*> 00000000 nop +[0-9a-f]+ <[^>]*> 03200009 jr t9 +[ ]*[0-9a-f]+: R_MIPS_JALR bar2 +[0-9a-f]+ <[^>]*> 00000000 nop + \.\.\. + \.\.\. + \.\.\. + \.\.\. |