summaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2005-11-10 09:41:14 +0000
committerNick Clifton <nickc@redhat.com>2005-11-10 09:41:14 +0000
commit75abe60ad075db75057ba858eb32addc45a66139 (patch)
tree72512f017d68e745e1958e124c47f2cfb6a34e9a /gas/testsuite
parent134ea98737a7b3cf2a478c799066b3bccf7c4f0b (diff)
downloadbinutils-redhat-75abe60ad075db75057ba858eb32addc45a66139.tar.gz
* config/tc-arm.c (BAD_ADDR_MODE): Define.
(arm_reg_parse_multi): Return NULL rather than FAIL. (arm_reg_parse): Fix comment, the function returns FAIL rather than NULL if it is unable to parse the register name. (do_ldrex): Use BAD_ADDR_MODE. Change error message for PC-relative addressing. (do_strex): Likewise. (do_t_ldrex): Use BAD_ADDR_MODE. (do_t_strex): Likewise. * gas/arm/archv6t2-bad.s: Add tests of badly composed ldrex and strex instructions. * gas/arm/archv6t2-bad.l: Add expected error messages. * gas/arm/r15-bad.l: Adjust error messages for r15 usage in ldrex and strex instructions.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog8
-rw-r--r--gas/testsuite/gas/arm/archv6t2-bad.l2
-rw-r--r--gas/testsuite/gas/arm/archv6t2-bad.s8
-rw-r--r--gas/testsuite/gas/arm/r15-bad.l4
4 files changed, 20 insertions, 2 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 5dfe8b655c..d896190018 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2005-11-10 Nick Clifton <nickc@redhat.com>
+
+ * gas/arm/archv6t2-bad.s: Add tests of badly composed ldrex and
+ strex instructions.
+ * gas/arm/archv6t2-bad.l: Add expected error messages.
+ * gas/arm/r15-bad.l: Adjust error messages for r15 usage in ldrex
+ and strex instructions.
+
2005-11-08 Arnold Metselaar <arnold.metselaar@planet.nl>
* gas/all/cofftag.s: Convert numbers in .type
diff --git a/gas/testsuite/gas/arm/archv6t2-bad.l b/gas/testsuite/gas/arm/archv6t2-bad.l
index e8da4b8aad..0f00db37b2 100644
--- a/gas/testsuite/gas/arm/archv6t2-bad.l
+++ b/gas/testsuite/gas/arm/archv6t2-bad.l
@@ -36,3 +36,5 @@
[^:]*:51: Warning: destination register same as write-back base
[^:]*:52: Warning: destination register same as write-back base
[^:]*:53: Warning: source register same as write-back base
+[^:]*:59: Error: instruction does not accept this addressing mode -- `ldrex r0,r2'
+[^:]*:60: Error: instruction does not accept this addressing mode -- `strex r1,r0,r2'
diff --git a/gas/testsuite/gas/arm/archv6t2-bad.s b/gas/testsuite/gas/arm/archv6t2-bad.s
index e56886912f..af1397271b 100644
--- a/gas/testsuite/gas/arm/archv6t2-bad.s
+++ b/gas/testsuite/gas/arm/archv6t2-bad.s
@@ -51,3 +51,11 @@ x:
ldrsbt r0,[r0]
ldrsht r0,[r0]
strht r0,[r0]
+
+ @ Bug reported by user. GAS used to issue an error message
+ @ "r15 not allowed here" for these two instructions because
+ @ it thought that the "r2" operand was a PC-relative branch
+ @ to a label called "r2".
+ ldrex r0, r2
+ strex r1, r0, r2
+ \ No newline at end of file
diff --git a/gas/testsuite/gas/arm/r15-bad.l b/gas/testsuite/gas/arm/r15-bad.l
index 02306360bc..a172e9e9ef 100644
--- a/gas/testsuite/gas/arm/r15-bad.l
+++ b/gas/testsuite/gas/arm/r15-bad.l
@@ -30,7 +30,7 @@
[^:]*:33: Error: r15 not allowed here -- `umaal r1,r2,r3,r15'
[^:]*:34: Error: r15 not allowed here -- `strex r15,r2,[[]r3[]]'
[^:]*:35: Error: r15 not allowed here -- `strex r1,r15,[[]r3[]]'
-[^:]*:36: Error: r15 not allowed here -- `strex r1,r2,[[]r15[]]'
+[^:]*:36: Error: instruction does not accept this addressing mode -- `strex r1,r2,[[]r15[]]'
[^:]*:37: Error: r15 not allowed here -- `ssat r15,#1,r2'
[^:]*:38: Error: r15 not allowed here -- `ssat r1,#1,r15'
[^:]*:39: Error: r15 not allowed here -- `ssat16 r15,#1,r2'
@@ -58,7 +58,7 @@
[^:]*:61: Error: r15 not allowed here -- `pkhtb r1,r15,r3'
[^:]*:62: Error: r15 not allowed here -- `pkhtb r1,r2,r15'
[^:]*:63: Error: r15 not allowed here -- `ldrex r15,[[]r2[]]'
-[^:]*:64: Error: r15 not allowed here -- `ldrex r1,[[]r15[]]'
+[^:]*:64: Error: instruction does not accept this addressing mode -- `ldrex r1,[[]r15[]]'
[^:]*:65: Error: r15 not allowed here -- `swp r15,r2,[[]r3[]]'
[^:]*:66: Error: r15 not allowed here -- `swp r1,r15,[[]r3[]]'
[^:]*:67: Error: r15 not allowed here -- `swp r1,r2,[[]r15[]]'