aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2010-07-24 01:43:32 +0000
committerMaciej W. Rozycki <macro@linux-mips.org>2010-07-24 01:43:32 +0000
commit4d2ad3b06d0951856569e528340b4bb960bbdbca (patch)
treeaed987e40b2864898d8ef9e510a3479fe7779818
parent6f02363dde50114c2821370c02645478252dbfa9 (diff)
downloadfsf-binutils-gdb-4d2ad3b06d0951856569e528340b4bb960bbdbca.zip
fsf-binutils-gdb-4d2ad3b06d0951856569e528340b4bb960bbdbca.tar.gz
fsf-binutils-gdb-4d2ad3b06d0951856569e528340b4bb960bbdbca.tar.bz2
* gas/mips/jal-svr4pic.d: Rename to...
* gas/mips/mips1@jal-svr4pic.d: ... this. * gas/mips/r3000@jal-svr4pic.d: New test subarchitecture. * gas/mips/jal-svr4pic.d: New default subarchitecture patterns. * gas/mips/mips.exp: Run jal-svr4pic with run_dump_test_arches rather than run_dump_test.
-rw-r--r--gas/testsuite/ChangeLog9
-rw-r--r--gas/testsuite/gas/mips/jal-svr4pic.d33
-rw-r--r--gas/testsuite/gas/mips/mips.exp5
-rw-r--r--gas/testsuite/gas/mips/mips1@jal-svr4pic.d51
-rw-r--r--gas/testsuite/gas/mips/r3000@jal-svr4pic.d5
5 files changed, 82 insertions, 21 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 527634d..a71657a 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,5 +1,14 @@
2010-07-24 Maciej W. Rozycki <macro@codesourcery.com>
+ * gas/mips/jal-svr4pic.d: Rename to...
+ * gas/mips/mips1@jal-svr4pic.d: ... this.
+ * gas/mips/r3000@jal-svr4pic.d: New test subarchitecture.
+ * gas/mips/jal-svr4pic.d: New default subarchitecture patterns.
+ * gas/mips/mips.exp: Run jal-svr4pic with run_dump_test_arches
+ rather than run_dump_test.
+
+2010-07-24 Maciej W. Rozycki <macro@codesourcery.com>
+
* gas/mips/jal-svr4pic.d: Reformat. Use --show-raw-insn with
`objdump'.
* gas/mips/jal-svr4pic.s: Reformat. Fix up trailing zeroes.
diff --git a/gas/testsuite/gas/mips/jal-svr4pic.d b/gas/testsuite/gas/mips/jal-svr4pic.d
index 027a040..dceba1e 100644
--- a/gas/testsuite/gas/mips/jal-svr4pic.d
+++ b/gas/testsuite/gas/mips/jal-svr4pic.d
@@ -1,6 +1,7 @@
-#objdump: -dr --prefix-addresses --show-raw-insn -mmips:3000
-#name: MIPS R3000 jal-svr4pic
-#as: -32 -mips1 -KPIC -mtune=r3000
+#objdump: -dr --prefix-addresses --show-raw-insn
+#name: MIPS jal-svr4pic
+#as: -32 -KPIC
+#source: jal-svr4pic.s
# Test the jal macro with -KPIC.
@@ -15,36 +16,28 @@ Disassembly of section \.text:
[0-9a-f]+ <[^>]*> afbc0000 sw gp,0\(sp\)
[0-9a-f]+ <[^>]*> 0320f809 jalr t9
[0-9a-f]+ <[^>]*> 00000000 nop
-[0-9a-f]+ <[^>]*> 8fbc0000 lw gp,0\(sp\)
[0-9a-f]+ <[^>]*> 03202009 jalr a0,t9
-[0-9a-f]+ <[^>]*> 00000000 nop
[0-9a-f]+ <[^>]*> 8fbc0000 lw gp,0\(sp\)
-[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 8fbc0000 lw gp,0\(sp\)
[0-9a-f]+ <[^>]*> 8f990000 lw t9,0\(gp\)
-[ ]*2c: R_MIPS_GOT16 .text
-[0-9a-f]+ <[^>]*> 00000000 nop
+[ ]*24: R_MIPS_GOT16 .text
[0-9a-f]+ <[^>]*> 27390000 addiu t9,t9,0
-[ ]*34: R_MIPS_LO16 .text
+[ ]*28: R_MIPS_LO16 .text
[0-9a-f]+ <[^>]*> 0320f809 jalr t9
-[ ]*38: R_MIPS_JALR text_label
+[ ]*2c: R_MIPS_JALR text_label
[0-9a-f]+ <[^>]*> 00000000 nop
[0-9a-f]+ <[^>]*> 8fbc0000 lw gp,0\(sp\)
-[0-9a-f]+ <[^>]*> 00000000 nop
[0-9a-f]+ <[^>]*> 8f990000 lw t9,0\(gp\)
-[ ]*48: R_MIPS_CALL16 weak_text_label
-[0-9a-f]+ <[^>]*> 00000000 nop
+[ ]*38: R_MIPS_CALL16 weak_text_label
[0-9a-f]+ <[^>]*> 0320f809 jalr t9
-[ ]*50: R_MIPS_JALR weak_text_label
+[ ]*3c: R_MIPS_JALR weak_text_label
[0-9a-f]+ <[^>]*> 00000000 nop
[0-9a-f]+ <[^>]*> 8fbc0000 lw gp,0\(sp\)
-[0-9a-f]+ <[^>]*> 00000000 nop
[0-9a-f]+ <[^>]*> 8f990000 lw t9,0\(gp\)
-[ ]*60: R_MIPS_CALL16 external_text_label
-[0-9a-f]+ <[^>]*> 00000000 nop
+[ ]*48: R_MIPS_CALL16 external_text_label
[0-9a-f]+ <[^>]*> 0320f809 jalr t9
-[ ]*68: R_MIPS_JALR external_text_label
+[ ]*4c: R_MIPS_JALR external_text_label
[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 1000ffea b 0+0000 <text_label>
[0-9a-f]+ <[^>]*> 8fbc0000 lw gp,0\(sp\)
-[0-9a-f]+ <[^>]*> 1000ffe2 b 0+0000 <text_label>
-[0-9a-f]+ <[^>]*> 00000000 nop
\.\.\.
diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp
index ed721ad..e3aade4 100644
--- a/gas/testsuite/gas/mips/mips.exp
+++ b/gas/testsuite/gas/mips/mips.exp
@@ -462,7 +462,10 @@ if { [istarget mips*-*-vxworks*] } {
run_dump_test "eret-2"
run_dump_test "eret-3"
- if $elf { run_dump_test "jal-svr4pic" }
+ if $elf {
+ run_dump_test_arches "jal-svr4pic" \
+ [mips_arch_list_matching mips1]
+ }
if $elf { run_dump_test "jal-xgot" }
run_list_test_arches "jal-range" "-32" [mips_arch_list_matching mips1]
if $has_newabi { run_dump_test "jal-newabi" }
diff --git a/gas/testsuite/gas/mips/mips1@jal-svr4pic.d b/gas/testsuite/gas/mips/mips1@jal-svr4pic.d
new file mode 100644
index 0000000..19f37eb
--- /dev/null
+++ b/gas/testsuite/gas/mips/mips1@jal-svr4pic.d
@@ -0,0 +1,51 @@
+#objdump: -dr --prefix-addresses --show-raw-insn
+#name: MIPS jal-svr4pic
+#as: -32 -KPIC
+#source: jal-svr4pic.s
+
+# Test the jal macro with -KPIC (MIPS1).
+
+.*: +file format .*mips.*
+
+Disassembly of section \.text:
+[0-9a-f]+ <[^>]*> 3c1c0000 lui gp,0x0
+[ ]*0: R_MIPS_HI16 _gp_disp
+[0-9a-f]+ <[^>]*> 279c0000 addiu gp,gp,0
+[ ]*4: R_MIPS_LO16 _gp_disp
+[0-9a-f]+ <[^>]*> 0399e021 addu gp,gp,t9
+[0-9a-f]+ <[^>]*> afbc0000 sw gp,0\(sp\)
+[0-9a-f]+ <[^>]*> 0320f809 jalr t9
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 8fbc0000 lw gp,0\(sp\)
+[0-9a-f]+ <[^>]*> 03202009 jalr a0,t9
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 8fbc0000 lw gp,0\(sp\)
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 8f990000 lw t9,0\(gp\)
+[ ]*2c: R_MIPS_GOT16 .text
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 27390000 addiu t9,t9,0
+[ ]*34: R_MIPS_LO16 .text
+[0-9a-f]+ <[^>]*> 0320f809 jalr t9
+[ ]*38: R_MIPS_JALR text_label
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 8fbc0000 lw gp,0\(sp\)
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 8f990000 lw t9,0\(gp\)
+[ ]*48: R_MIPS_CALL16 weak_text_label
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 0320f809 jalr t9
+[ ]*50: R_MIPS_JALR weak_text_label
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 8fbc0000 lw gp,0\(sp\)
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 8f990000 lw t9,0\(gp\)
+[ ]*60: R_MIPS_CALL16 external_text_label
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 0320f809 jalr t9
+[ ]*68: R_MIPS_JALR external_text_label
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 8fbc0000 lw gp,0\(sp\)
+[0-9a-f]+ <[^>]*> 1000ffe2 b 0+0000 <text_label>
+[0-9a-f]+ <[^>]*> 00000000 nop
+ \.\.\.
diff --git a/gas/testsuite/gas/mips/r3000@jal-svr4pic.d b/gas/testsuite/gas/mips/r3000@jal-svr4pic.d
new file mode 100644
index 0000000..9b45e59
--- /dev/null
+++ b/gas/testsuite/gas/mips/r3000@jal-svr4pic.d
@@ -0,0 +1,5 @@
+#objdump: -dr --prefix-addresses --show-raw-insn
+#name: MIPS jal-svr4pic
+#as: -32 -KPIC
+#source: jal-svr4pic.s
+#dump: mips1@jal-svr4pic.d