aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2004-12-09 07:14:53 +0000
committerIan Lance Taylor <ian@airs.com>2004-12-09 07:14:53 +0000
commit3a6eb9c0d7dfb4341b70eaf8f0ddffc63ce3adb5 (patch)
tree583e437f8d7b567caa37b4627e1b0b967291c5ba /ld/testsuite
parent1367d393bb745062d59a988a408f36bbb326764d (diff)
downloadgdb-3a6eb9c0d7dfb4341b70eaf8f0ddffc63ce3adb5.zip
gdb-3a6eb9c0d7dfb4341b70eaf8f0ddffc63ce3adb5.tar.gz
gdb-3a6eb9c0d7dfb4341b70eaf8f0ddffc63ce3adb5.tar.bz2
* ld-mips-elf/jalbal.d: New test.
* ld-mips-elf/jalbal.s: New test. * ld-mips-elf/mips-elf.exp: Run it.
Diffstat (limited to 'ld/testsuite')
-rw-r--r--ld/testsuite/ChangeLog6
-rw-r--r--ld/testsuite/ld-mips-elf/jalbal.d24
-rw-r--r--ld/testsuite/ld-mips-elf/jalbal.s18
-rw-r--r--ld/testsuite/ld-mips-elf/mips-elf.exp1
4 files changed, 49 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index f7061ed..e9932f9 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2004-12-09 Ian Lance Taylor <ian@wasabisystems.com>
+
+ * ld-mips-elf/jalbal.d: New test.
+ * ld-mips-elf/jalbal.s: New test.
+ * ld-mips-elf/mips-elf.exp: Run it.
+
2004-12-08 Ian Lance Taylor <ian@wasabisystems.com>
* ld-mips-elf/jaloverflow.d: New test.
diff --git a/ld/testsuite/ld-mips-elf/jalbal.d b/ld/testsuite/ld-mips-elf/jalbal.d
new file mode 100644
index 0000000..9b50754
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/jalbal.d
@@ -0,0 +1,24 @@
+#name: jal to bal
+#source: jalbal.s
+#as: -EB -n32 -march=rm9000
+#ld: -e s1 -Ttext 0x100000a0
+#objdump: -d
+
+.*file format elf.*mips.*
+
+Disassembly of section \.text:
+
+.* <s1>:
+.* 0c00802a jal .*100200a8 <s3>
+.* 00000000 nop
+.* 04117fff bal .*100200a8 <s3>
+
+.* <s2>:
+.* \.\.\.
+
+.* <s3>:
+.* 04118000 bal .*100000ac <s2>
+.* 00000000 nop
+.* 0c00002b jal .*100000ac <s2>
+.* 00000000 nop
+.* \.\.\.
diff --git a/ld/testsuite/ld-mips-elf/jalbal.s b/ld/testsuite/ld-mips-elf/jalbal.s
new file mode 100644
index 0000000..4273b9f
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/jalbal.s
@@ -0,0 +1,18 @@
+# Test that jal gets converted to bal on the RM9000 when it is in range.
+ .text
+ .global s1
+ .type s1,@function
+ .set noreorder
+s1:
+ jal s3
+ nop
+ jal s3
+s2:
+ nop
+ .space 0x1fff8
+s3:
+ jal s2
+ nop
+ jal s2
+ nop
+ nop
diff --git a/ld/testsuite/ld-mips-elf/mips-elf.exp b/ld/testsuite/ld-mips-elf/mips-elf.exp
index 0cc8489..1c4c327 100644
--- a/ld/testsuite/ld-mips-elf/mips-elf.exp
+++ b/ld/testsuite/ld-mips-elf/mips-elf.exp
@@ -81,3 +81,4 @@ if {$has_newabi && $linux_gnu} {
}
run_dump_test "jaloverflow"
+run_dump_test "jalbal"