* gas/arm/thumb-b-bad.s: New test.
* gas/arm/thumb-b-bad.d: Test control file.
* gas/arm/thumb-b-bad.l: Expected error output.
+2011-06-30 Nick Clifton <nickc@redhat.com>
+
+ PR 12848
+ * gas/arm/thumb-b-bad.s: New test.
+ * gas/arm/thumb-b-bad.d: Test control file.
+ * gas/arm/thumb-b-bad.l: Expected error output.
+
2011-06-29 Richard Sandiford <rdsandiford@googlemail.com>
* gas/mips/mips16-e.d, gas/mips/mips16-f.d,
--- /dev/null
+#name: Out of range Thumb branches (PR 12848)
+#skip: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+#as: -mthumb
+#error-output: thumb-b-bad.l
--- /dev/null
+[^:]*: Assembler messages:
+[^:]*:9: Error: branch out of range
+[^:]*:5: Error: branch out of range
+[^:]*:8: Error: branch out of range
+[^:]*:11: Error: branch out of range
+[^:]*:15: Error: branch out of range
--- /dev/null
+.syntax unified
+
+.type f, %function
+e:
+ b . - 0xfffffe @ gas mis-assembles as a forward branch
+ b . - 0xfffffc
+ b . + 0x1000002
+ b . + 0x1000004 @ gas mis-assembles as a backward branch
+ b.w . + 0x2000002 @ gas mis-assembles as a backward branch
+
+f: b g @ gas mis-assembles as a backward branch
+
+ .space 0x1fffff0
+
+g: b f @ gas mis-assembles as a forward branch
+
+