aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2011-06-30 13:05:04 +0000
committerNick Clifton <nickc@redhat.com>2011-06-30 13:05:04 +0000
commitf1d0450fe0744a571c214ff3a4518f2d5fb17c72 (patch)
tree439e1dc7b52041ee2d5259c04d63f3bd076ee1ef /gas
parent08f10d51f90cb7e81348c200db2889300fd07459 (diff)
downloadgdb-f1d0450fe0744a571c214ff3a4518f2d5fb17c72.zip
gdb-f1d0450fe0744a571c214ff3a4518f2d5fb17c72.tar.gz
gdb-f1d0450fe0744a571c214ff3a4518f2d5fb17c72.tar.bz2
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.
Diffstat (limited to 'gas')
-rw-r--r--gas/testsuite/ChangeLog7
-rw-r--r--gas/testsuite/gas/arm/thumb-b-bad.d4
-rw-r--r--gas/testsuite/gas/arm/thumb-b-bad.l6
-rw-r--r--gas/testsuite/gas/arm/thumb-b-bad.s17
4 files changed, 34 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 0694126..ed91f24 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+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,
diff --git a/gas/testsuite/gas/arm/thumb-b-bad.d b/gas/testsuite/gas/arm/thumb-b-bad.d
new file mode 100644
index 0000000..958773db
--- /dev/null
+++ b/gas/testsuite/gas/arm/thumb-b-bad.d
@@ -0,0 +1,4 @@
+#name: Out of range Thumb branches (PR 12848)
+#skip: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+#as: -mthumb
+#error-output: thumb-b-bad.l
diff --git a/gas/testsuite/gas/arm/thumb-b-bad.l b/gas/testsuite/gas/arm/thumb-b-bad.l
new file mode 100644
index 0000000..0c76b4d
--- /dev/null
+++ b/gas/testsuite/gas/arm/thumb-b-bad.l
@@ -0,0 +1,6 @@
+[^:]*: 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
diff --git a/gas/testsuite/gas/arm/thumb-b-bad.s b/gas/testsuite/gas/arm/thumb-b-bad.s
new file mode 100644
index 0000000..7306b79
--- /dev/null
+++ b/gas/testsuite/gas/arm/thumb-b-bad.s
@@ -0,0 +1,17 @@
+.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
+
+