aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorRichard Earnshaw <richard.earnshaw@arm.com>2002-01-14 15:00:18 +0000
committerRichard Earnshaw <richard.earnshaw@arm.com>2002-01-14 15:00:18 +0000
commit2ad6300c8ef1bebb8f774d6eb6c4f18f8e07f9e2 (patch)
tree343600e78574bb9e3b6594d6cf0aad8bf7db3784 /gas
parent1209e219c7959fabc721933472e382839554459c (diff)
downloadgdb-2ad6300c8ef1bebb8f774d6eb6c4f18f8e07f9e2.zip
gdb-2ad6300c8ef1bebb8f774d6eb6c4f18f8e07f9e2.tar.gz
gdb-2ad6300c8ef1bebb8f774d6eb6c4f18f8e07f9e2.tar.bz2
* gas/arm/armv1-bad.s gas/arm/armv1-bad.l: New files.
* gas/arm/arm.exp (run_error_test): New proc. (armv1-bad): New error test.
Diffstat (limited to 'gas')
-rw-r--r--gas/testsuite/ChangeLog6
-rw-r--r--gas/testsuite/gas/arm/arm.exp15
-rw-r--r--gas/testsuite/gas/arm/armv1-bad.l8
-rw-r--r--gas/testsuite/gas/arm/armv1-bad.s10
4 files changed, 39 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 4f00f3d..9a2b609 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2002-01-14 Richard Earnshaw <rearnsha@arm.com>
+
+ * gas/arm/armv1-bad.s gas/arm/armv1-bad.l: New files.
+ * gas/arm/arm.exp (run_error_test): New proc.
+ (armv1-bad): New error test.
+
2002-01-11 Richard Earnshaw <rearnsha@arm.com>
* gas/arm/ldconst.s gas/arm/ldconst.d: New files. Test ldr with
diff --git a/gas/testsuite/gas/arm/arm.exp b/gas/testsuite/gas/arm/arm.exp
index 12d7b32..cacf0b0 100644
--- a/gas/testsuite/gas/arm/arm.exp
+++ b/gas/testsuite/gas/arm/arm.exp
@@ -1,11 +1,26 @@
#
# Some ARM tests
#
+proc run_errors_test { name opts tname} {
+ global srcdir subdir
+ set testname "$tname"
+ set file $srcdir/$subdir/$name
+ gas_run ${name}.s $opts ">&${name}.out"
+ if { [regexp_diff "${name}.out" "${file}.l"] } then {
+ fail $testname
+ verbose "output is [file_contents "${name}.out"]" 2
+ return
+ }
+ pass $testname
+}
+
if {[istarget *arm*-*-*] || [istarget "xscale-*-*"]} then {
run_dump_test "inst"
run_dump_test "ldconst"
+ run_errors_test "armv1-bad" "-marm1" "ARM v1 errors"
+
gas_test "arm3.s" "-marm3" $stdoptlist "Arm 3 instructions"
gas_test "arm6.s" "-marm6" $stdoptlist "Arm 6 instructions"
diff --git a/gas/testsuite/gas/arm/armv1-bad.l b/gas/testsuite/gas/arm/armv1-bad.l
new file mode 100644
index 0000000..96d9e73
--- /dev/null
+++ b/gas/testsuite/gas/arm/armv1-bad.l
@@ -0,0 +1,8 @@
+[^:]*: Assembler messages:
+[^:]*:4: Error: invalid pseudo operation -- `str r0,=0x00ff0000'
+[^:]*:5: Error: bad expression -- `ldr r0,{r1}'
+[^:]*:6: Error: address offset too large -- `ldr r0,\[r1,#4096\]'
+[^:]*:7: Error: address offset too large -- `ldr r0,\[r1,#-4096\]'
+[^:]*:8: Error: invalid constant -- `mov r0,#0x1ff'
+[^:]*:9: Error: bad instruction `cmpl r0,r0'
+[^:]*:10: Error: selected processor does not support `strh r0,\[r1\]'
diff --git a/gas/testsuite/gas/arm/armv1-bad.s b/gas/testsuite/gas/arm/armv1-bad.s
new file mode 100644
index 0000000..c879a73
--- /dev/null
+++ b/gas/testsuite/gas/arm/armv1-bad.s
@@ -0,0 +1,10 @@
+ .global entry
+ .text
+entry:
+ str r0, =0x00ff0000
+ ldr r0, {r1}
+ ldr r0, [r1, #4096]
+ ldr r0, [r1, #-4096]
+ mov r0, #0x1ff
+ cmpl r0, r0
+ strh r0, [r1]