aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gas/testsuite/ChangeLog8
-rw-r--r--gas/testsuite/gas/mips/illegal.l3
-rw-r--r--gas/testsuite/gas/mips/illegal.s5
-rw-r--r--gas/testsuite/gas/mips/mips.exp16
4 files changed, 32 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 0f76075..c7b2b07 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,5 +1,13 @@
2001-06-08 H.J. Lu <hjl@gnu.org>
+ * gas/mips/illegal.s: New file.
+ * gas/mips/illegal.l: Likewise.
+
+ * gas/elf/elf.exp (run_list_test): New.
+ Run illegal with run_list_test.
+
+2001-06-08 H.J. Lu <hjl@gnu.org>
+
* gas/mips/elf-jal.d: New file.
* gas/mips/mips.exp: Run "elf-jal" instead of "jal" for ELF.
diff --git a/gas/testsuite/gas/mips/illegal.l b/gas/testsuite/gas/mips/illegal.l
new file mode 100644
index 0000000..fc6a41f
--- /dev/null
+++ b/gas/testsuite/gas/mips/illegal.l
@@ -0,0 +1,3 @@
+.*: Assembler messages:
+.*:4: Error: illegal operands `move 1,2'
+.*:5: Error: illegal operands `c.eq.s 1,2'
diff --git a/gas/testsuite/gas/mips/illegal.s b/gas/testsuite/gas/mips/illegal.s
new file mode 100644
index 0000000..ec38194
--- /dev/null
+++ b/gas/testsuite/gas/mips/illegal.s
@@ -0,0 +1,5 @@
+# Source file used to test illegal operands.
+
+foo:
+ move 1,2
+ c.eq.s 1,2
diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp
index 9a12464..acc4c3b 100644
--- a/gas/testsuite/gas/mips/mips.exp
+++ b/gas/testsuite/gas/mips/mips.exp
@@ -1,6 +1,20 @@
#
# Some generic MIPS tests
#
+
+proc run_list_test { name opts } {
+ global srcdir subdir
+ set testname "MIPS $name"
+ set file $srcdir/$subdir/$name
+ gas_run ${name}.s $opts ">&dump.out"
+ if { [regexp_diff "dump.out" "${file}.l"] } then {
+ fail $testname
+ verbose "output is [file_contents "dump.out"]" 2
+ return
+ }
+ pass $testname
+}
+
if { [istarget mips*-*-*] } then {
set no_mips16 0
set svr4pic [expr [istarget *-*-elf*] || [istarget *-*-irix5*] || [istarget *-*-irix6* ] || [istarget *-*-linux*] ]
@@ -99,6 +113,8 @@ if { [istarget mips*-*-*] } then {
run_dump_test "mips32"
run_dump_test "mips64"
+ run_list_test "illegal" ""
+
if $svr4pic {
# Make sure that -mcpu=FOO and -mFOO are equivalent. Assemble a file
# containing 4650-specific instructions with -m4650 and -mcpu=4650,