aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2010-11-10 13:36:31 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2010-11-10 13:36:31 +0000
commit12d6b0b7ba4c753349cc4a87986ef093959e3a77 (patch)
tree342831c0c08b2730e8a0f9d5c50828e8ffc9987f /gas/testsuite
parentfd3646071c278ca4c39ac6904a9a520c24cd25f9 (diff)
downloadgdb-12d6b0b7ba4c753349cc4a87986ef093959e3a77.zip
gdb-12d6b0b7ba4c753349cc4a87986ef093959e3a77.tar.gz
gdb-12d6b0b7ba4c753349cc4a87986ef093959e3a77.tar.bz2
gas/
* config/tc-arm.c (do_t_branch): Treat (PLT) branches as wide. gas/testsuite/ * gas/arm/plt-1.s, gas/arm/plt-1.d: New test.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog4
-rw-r--r--gas/testsuite/gas/arm/plt-1.d38
-rw-r--r--gas/testsuite/gas/arm/plt-1.s27
3 files changed, 69 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 7c4bdc2..b6e6219 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2010-11-10 Richard Sandiford <richard.sandiford@linaro.org>
+
+ * gas/arm/plt-1.s, gas/arm/plt-1.d: New test.
+
2010-11-08 Thomas Schwinge <thomas@schwinge.name>
* lib/gas-defs.exp (is_elf_format): Consider for *-*-gnu*, too.
diff --git a/gas/testsuite/gas/arm/plt-1.d b/gas/testsuite/gas/arm/plt-1.d
new file mode 100644
index 0000000..ba25f8d
--- /dev/null
+++ b/gas/testsuite/gas/arm/plt-1.d
@@ -0,0 +1,38 @@
+# name: Thumb branch to PLT
+# as:
+# objdump: -dr
+# This test is only valid on ELF based ports.
+#not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+.*: +file format .*arm.*
+
+
+Disassembly of section \.text:
+
+0+000 <Strong1>:
+ 0: f7ff bffe b\.w 12 <Strong2>
+ 0: R_ARM_THM_JUMP24 Strong2
+ 4: f7ff bffe b\.w 12 <Strong2>
+ 4: R_ARM_THM_JUMP24 Strong2
+ 8: e7fe b\.n 12 <Strong2>
+ 8: R_ARM_THM_JUMP11 Strong2
+ a: e7fe b\.n 12 <Strong2>
+ a: R_ARM_THM_JUMP11 Strong2
+ c: f7ff bffe b\.w 12 <Strong2>
+ c: R_ARM_THM_JUMP24 Strong2
+ 10: e7fe b\.n 12 <Strong2>
+ 10: R_ARM_THM_JUMP11 Strong2
+
+0+012 <Strong2>:
+ 12: f7ff bffe b\.w 0 <Strong1>
+ 12: R_ARM_THM_JUMP24 Strong1
+ 16: f7ff bffe b\.w 0 <Strong1>
+ 16: R_ARM_THM_JUMP24 Strong1
+ 1a: e7fe b\.n 0 <Strong1>
+ 1a: R_ARM_THM_JUMP11 Strong1
+ 1c: e7fe b\.n 0 <Strong1>
+ 1c: R_ARM_THM_JUMP11 Strong1
+ 1e: f7ff bffe b\.w 0 <Strong1>
+ 1e: R_ARM_THM_JUMP24 Strong1
+ 22: e7fe b\.n 0 <Strong1>
+ 22: R_ARM_THM_JUMP11 Strong1
diff --git a/gas/testsuite/gas/arm/plt-1.s b/gas/testsuite/gas/arm/plt-1.s
new file mode 100644
index 0000000..262980a
--- /dev/null
+++ b/gas/testsuite/gas/arm/plt-1.s
@@ -0,0 +1,27 @@
+ .syntax unified
+ .text
+ .thumb
+
+ .globl Strong1
+ .thumb_func
+ .type Strong1, %function
+Strong1:
+ b Strong2(PLT)
+ b.w Strong2(PLT)
+ b.n Strong2(PLT)
+ b Strong2
+ b.w Strong2
+ b.n Strong2
+ .size Strong1,.-Strong1
+
+ .globl Strong2
+ .thumb_func
+ .type Strong2, %function
+Strong2:
+ b Strong1(PLT)
+ b.w Strong1(PLT)
+ b.n Strong1(PLT)
+ b Strong1
+ b.w Strong1
+ b.n Strong1
+ .size Strong2, .-Strong2