aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorThiemo Seufer <ths@networkno.de>2003-05-22 12:13:43 +0000
committerThiemo Seufer <ths@networkno.de>2003-05-22 12:13:43 +0000
commit3302cdecd114d6835ba6751b75cd996ffee1d190 (patch)
tree1995ea11c296db1bec9e602fb59a45bc4ffc5676 /gas
parentd0c728db63fdac4cd4b02fef0275b45399d46059 (diff)
downloadgdb-3302cdecd114d6835ba6751b75cd996ffee1d190.zip
gdb-3302cdecd114d6835ba6751b75cd996ffee1d190.tar.gz
gdb-3302cdecd114d6835ba6751b75cd996ffee1d190.tar.bz2
* gas/mips/jal-newabi.s: New file, testcase for NewABI xgot jal macro.
* gas/mips/jal-newabi.d: Likewise. * gas/mips/mips.exp: Add new testcase.
Diffstat (limited to 'gas')
-rw-r--r--gas/testsuite/ChangeLog6
-rw-r--r--gas/testsuite/gas/mips/jal-newabi.d17
-rw-r--r--gas/testsuite/gas/mips/jal-newabi.s7
-rw-r--r--gas/testsuite/gas/mips/mips.exp1
4 files changed, 31 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 794686f..2430357 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * gas/mips/jal-newabi.s: New file, testcase for NewABI xgot jal macro.
+ * gas/mips/jal-newabi.d: Likewise.
+ * gas/mips/mips.exp: Add new testcase.
+
2003-05-21 H.J. Lu <hongjiu.lu@intel.com>
* gas/hppa/parse/parse.exp: Add "space.s".
diff --git a/gas/testsuite/gas/mips/jal-newabi.d b/gas/testsuite/gas/mips/jal-newabi.d
new file mode 100644
index 0000000..b4503ce
--- /dev/null
+++ b/gas/testsuite/gas/mips/jal-newabi.d
@@ -0,0 +1,17 @@
+#objdump: -dr --prefix-addresses --show-raw-insn
+#name: MIPS ELF NewABI jal
+#as: -n32 -KPIC -xgot
+
+.*: +file format elf32-n.*mips.*
+
+Disassembly of section \.text:
+00000000 <label> 3c041234 lui a0,0x1234
+00000004 <label\+0x4> 34845678 ori a0,a0,0x5678
+00000008 <label\+0x8> 8f990000 lw t9,0\(gp\)
+ 8: R_MIPS_GOT_PAGE .text
+0000000c <label\+0xc> 23390000 addi t9,t9,0
+ c: R_MIPS_GOT_OFST .text
+00000010 <label\+0x10> 0320f809 jalr t9
+ 10: R_MIPS_JALR .text
+00000014 <label\+0x14> 00000000 nop
+ ...
diff --git a/gas/testsuite/gas/mips/jal-newabi.s b/gas/testsuite/gas/mips/jal-newabi.s
new file mode 100644
index 0000000..90f8039
--- /dev/null
+++ b/gas/testsuite/gas/mips/jal-newabi.s
@@ -0,0 +1,7 @@
+# Source file used to test the jal macro for NewABI.
+label:
+ dli $4, 0x12345678
+ jal label
+
+# Make objdump print ...
+ .space 8
diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp
index 97e2588..5afc8a7 100644
--- a/gas/testsuite/gas/mips/mips.exp
+++ b/gas/testsuite/gas/mips/mips.exp
@@ -450,6 +450,7 @@ if { [istarget mips*-*-*] } then {
run_dump_test_arches "jal-empic-elf-3" [mips_arch_list_matching mips1]
}
run_list_test_arches "jal-range" "-32" [mips_arch_list_matching mips1]
+ if $has_newabi { run_dump_test "jal-newabi" }
if !$aout { run_dump_test "la" }
if $elf { run_dump_test "la-svr4pic" }
if $elf { run_dump_test "la-xgot" }