aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2003-06-12 05:45:50 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2003-06-12 05:45:50 +0000
commit34ce925ee0917c2d7049c6da671817e1af8bb849 (patch)
tree048ddc8c3848d588fc5beb580969610d365d20fc /gas/testsuite
parent7282305265e2fee186dabcd1abc6a666f6f05222 (diff)
downloadgdb-34ce925ee0917c2d7049c6da671817e1af8bb849.zip
gdb-34ce925ee0917c2d7049c6da671817e1af8bb849.tar.gz
gdb-34ce925ee0917c2d7049c6da671817e1af8bb849.tar.bz2
* config/tc-mips.c (append_insn): In a compound relocation, take the
field width from the final (outermost) operator.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog5
-rw-r--r--gas/testsuite/gas/mips/elf-rel15.d14
-rw-r--r--gas/testsuite/gas/mips/elf-rel15.s4
-rw-r--r--gas/testsuite/gas/mips/mips.exp2
4 files changed, 25 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 1ef04ab..8458294 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2003-06-12 Richard Sandiford <rsandifo@redhat.com>
+
+ * gas/mips/elf-rel15.[sd]: New test.
+ * gas/mips/mips.exp: Run it.
+
2003-06-11 Richard Henderson <rth@redhat.com>
* gas/cfi/cfi-common-3.[ds]: New.
diff --git a/gas/testsuite/gas/mips/elf-rel15.d b/gas/testsuite/gas/mips/elf-rel15.d
new file mode 100644
index 0000000..7bb7878
--- /dev/null
+++ b/gas/testsuite/gas/mips/elf-rel15.d
@@ -0,0 +1,14 @@
+#objdump: -dr
+#as: -mabi=n32 -mips3
+
+.*: file format .*
+
+Disassembly of section \.text:
+
+00000000 <foo>:
+ 0: 3c020000 lui v0,0x0
+ 0: R_MIPS_GPREL16 \.text
+ 0: R_MIPS_SUB \*ABS\*
+ 0: R_MIPS_HI16 \*ABS\*
+ 4: 23bdffe4 addi sp,sp,-28
+ ...
diff --git a/gas/testsuite/gas/mips/elf-rel15.s b/gas/testsuite/gas/mips/elf-rel15.s
new file mode 100644
index 0000000..c0bc623
--- /dev/null
+++ b/gas/testsuite/gas/mips/elf-rel15.s
@@ -0,0 +1,4 @@
+foo:
+ lui $2,%hi(%neg(%gp_rel(foo)))
+ sub $sp,$sp,28
+ .space 16
diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp
index 9bb3772..2330443 100644
--- a/gas/testsuite/gas/mips/mips.exp
+++ b/gas/testsuite/gas/mips/mips.exp
@@ -645,6 +645,8 @@ if { [istarget mips*-*-*] } then {
run_dump_test "elf-rel14"
if $has_newabi {
+ run_dump_test "elf-rel15"
+
run_dump_test "elf-rel-got-n32"
run_dump_test "elf-rel-xgot-n32"
run_dump_test "elf-rel-got-n64"