summaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2004-12-10 19:48:42 +0000
committerIan Lance Taylor <ian@airs.com>2004-12-10 19:48:42 +0000
commit5390a7431a02d241b32ad4f2b2f452ccfad68b9f (patch)
tree152b90d756edc48887a45ed27e926f7f5f501f5e /gas
parente32342b035075975a44a35c1f8f5524394da0355 (diff)
downloadbinutils-redhat-5390a7431a02d241b32ad4f2b2f452ccfad68b9f.tar.gz
* gas/mips/elf-rel23a.d: New test.
* gas/mips/elf-rel23b.d: New test. * gas/mips/elf-rel25.s: New test. * gas/mips/elf-rel25.d: New test. * gas/mips/elf-rel25a.d: New test. * gas/mips/mips.exp: Run new tests.
Diffstat (limited to 'gas')
-rw-r--r--gas/testsuite/ChangeLog9
-rw-r--r--gas/testsuite/gas/mips/elf-rel23a.d20
-rw-r--r--gas/testsuite/gas/mips/elf-rel23b.d16
-rw-r--r--gas/testsuite/gas/mips/elf-rel25.d15
-rw-r--r--gas/testsuite/gas/mips/elf-rel25.s8
-rw-r--r--gas/testsuite/gas/mips/elf-rel25a.d15
-rw-r--r--gas/testsuite/gas/mips/mips.exp5
7 files changed, 88 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 095611378b..386340d60a 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,12 @@
+2004-12-10 Ian Lance Taylor <ian@wasabisystems.com>
+
+ * gas/mips/elf-rel23a.d: New test.
+ * gas/mips/elf-rel23b.d: New test.
+ * gas/mips/elf-rel25.s: New test.
+ * gas/mips/elf-rel25.d: New test.
+ * gas/mips/elf-rel25a.d: New test.
+ * gas/mips/mips.exp: Run new tests.
+
2004-12-09 Paul Brook <paul@codesourcery.com>
* gas/arm/unwind.d: Expect R_ARM_PREL31 relocations.
diff --git a/gas/testsuite/gas/mips/elf-rel23a.d b/gas/testsuite/gas/mips/elf-rel23a.d
new file mode 100644
index 0000000000..f5f4cbf241
--- /dev/null
+++ b/gas/testsuite/gas/mips/elf-rel23a.d
@@ -0,0 +1,20 @@
+#source: elf-rel23.s
+#as: -march=mips3 -mabi=64 -mno-shared
+#objdump: -dr -Mgpr-names=numeric
+#name: MIPS ELF reloc 23 -mabi=64 -mno-shared
+
+.*: * file format elf64-tradbigmips
+
+Disassembly of section \.text:
+
+0+00 <.*>:
+.*: 0380282d move \$5,\$28
+.*: 3c1c0000 lui \$28,0x0
+ .*: R_MIPS_GPREL16 foo
+ .*: R_MIPS_SUB \*ABS\*
+ .*: R_MIPS_HI16 \*ABS\*
+.*: 279c0000 addiu \$28,\$28,0
+ .*: R_MIPS_GPREL16 foo
+ .*: R_MIPS_SUB \*ABS\*
+ .*: R_MIPS_LO16 \*ABS\*
+.*: 0384e02d daddu \$28,\$28,\$4
diff --git a/gas/testsuite/gas/mips/elf-rel23b.d b/gas/testsuite/gas/mips/elf-rel23b.d
new file mode 100644
index 0000000000..b144a840ae
--- /dev/null
+++ b/gas/testsuite/gas/mips/elf-rel23b.d
@@ -0,0 +1,16 @@
+#source: elf-rel23.s
+#as: -march=mips3 -mabi=n32 -mno-shared
+#objdump: -dr -Mgpr-names=numeric
+#name: MIPS ELF reloc 23 -mabi=n32 -mno-shared
+
+.*: * file format elf.*mips.*
+
+Disassembly of section \.text:
+
+0+00 <.*>:
+.*: 0380282d move \$5,\$28
+.*: 3c1c0000 lui \$28,0x0
+ .*: R_MIPS_HI16 _gp
+.*: 279c0000 addiu \$28,\$28,0
+ .*: R_MIPS_LO16 _gp
+.*: 00000000 nop
diff --git a/gas/testsuite/gas/mips/elf-rel25.d b/gas/testsuite/gas/mips/elf-rel25.d
new file mode 100644
index 0000000000..579fea642f
--- /dev/null
+++ b/gas/testsuite/gas/mips/elf-rel25.d
@@ -0,0 +1,15 @@
+#as: -march=mips1 -mabi=32
+#objdump: -dr -Mgpr-names=numeric
+#name: MIPS ELF reloc 25
+
+.*: * file format elf.*mips.*
+
+Disassembly of section \.text:
+
+0+00 <.*>:
+.*: 3c1c0000 lui \$28,0x0
+ .*: R_MIPS_HI16 _gp_disp
+.*: 279c0000 addiu \$28,\$28,0
+ .*: R_MIPS_LO16 _gp_disp
+.*: 0399e021 addu \$28,\$28,\$25
+.*: 00000000 nop
diff --git a/gas/testsuite/gas/mips/elf-rel25.s b/gas/testsuite/gas/mips/elf-rel25.s
new file mode 100644
index 0000000000..bfdd37739a
--- /dev/null
+++ b/gas/testsuite/gas/mips/elf-rel25.s
@@ -0,0 +1,8 @@
+ .abicalls
+ .globl foo
+ .ent foo
+foo:
+ .set noreorder
+ .cpload $25
+ .set reorder
+ .end foo
diff --git a/gas/testsuite/gas/mips/elf-rel25a.d b/gas/testsuite/gas/mips/elf-rel25a.d
new file mode 100644
index 0000000000..c7145c049b
--- /dev/null
+++ b/gas/testsuite/gas/mips/elf-rel25a.d
@@ -0,0 +1,15 @@
+#source: elf-rel25.s
+#as: -march=mips1 -mabi=32 -mno-shared
+#objdump: -dr -Mgpr-names=numeric
+#name: MIPS ELF reloc 25 -mno-shared
+
+.*: * file format elf.*mips.*
+
+Disassembly of section \.text:
+
+0+00 <.*>:
+.*: 3c1c0000 lui \$28,0x0
+ .*: R_MIPS_HI16 _gp
+.*: 279c0000 addiu \$28,\$28,0
+ .*: R_MIPS_LO16 _gp
+ \.\.\.
diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp
index db6b6b4812..4c1e308eb6 100644
--- a/gas/testsuite/gas/mips/mips.exp
+++ b/gas/testsuite/gas/mips/mips.exp
@@ -666,9 +666,14 @@ if { [istarget mips*-*-*] } then {
run_dump_test "elf-rel21"
run_dump_test "elf-rel22"
run_dump_test "elf-rel23"
+ run_dump_test "elf-rel23a"
+ run_dump_test "elf-rel23b"
run_dump_test "elf-rel24"
}
+ run_dump_test "elf-rel25"
+ run_dump_test "elf-rel25a"
+
if { !$no_mips16 } {
run_dump_test "${tmips}mips${el}16-e"
run_dump_test "${tmips}mips${el}16-f"