2001-06-08 H.J. Lu <hjl@gnu.org>
authorH.J. Lu <hjl.tools@gmail.com>
Sat, 9 Jun 2001 04:54:16 +0000 (04:54 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Sat, 9 Jun 2001 04:54:16 +0000 (04:54 +0000)
* 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.

gas/testsuite/ChangeLog
gas/testsuite/gas/mips/illegal.l [new file with mode: 0644]
gas/testsuite/gas/mips/illegal.s [new file with mode: 0644]
gas/testsuite/gas/mips/mips.exp

index 0f76075f9f950a52bae3af4bc83ff528c7322eef..c7b2b079e812553ad29487b74860fe795da8cb86 100644 (file)
@@ -1,3 +1,11 @@
+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.
diff --git a/gas/testsuite/gas/mips/illegal.l b/gas/testsuite/gas/mips/illegal.l
new file mode 100644 (file)
index 0000000..fc6a41f
--- /dev/null
@@ -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 (file)
index 0000000..ec38194
--- /dev/null
@@ -0,0 +1,5 @@
+# Source file used to test illegal operands.
+
+foo:
+       move    1,2
+       c.eq.s  1,2
index 9a124641c595662d1dc7ccc80997aaac49718808..acc4c3bd1e360785466535d64148a843313796cf 100644 (file)
@@ -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,