* gas/mips/r5900.s: New testcase for r5900 insns.
authorJeff Law <law@redhat.com>
Tue, 16 Dec 1997 11:54:21 +0000 (11:54 +0000)
committerJeff Law <law@redhat.com>
Tue, 16 Dec 1997 11:54:21 +0000 (11:54 +0000)
        * gas/mips/r5900.d: Support file for r5900 tests.
        * gas/mips/mips.exp: Run r5900 tests too.

gas/testsuite/.Sanitize
gas/testsuite/ChangeLog
gas/testsuite/gas/mips/.Sanitize
gas/testsuite/gas/mips/mips.exp
gas/testsuite/gas/mips/r5900.d [new file with mode: 0644]
gas/testsuite/gas/mips/r5900.s [new file with mode: 0644]

index 6362072b9a09cad485ef86be7afbf955e1e76b1e..68a74f4e1cf340b35a862caaec0399a4503c0294 100644 (file)
@@ -128,6 +128,34 @@ else
        done
 fi
 
+r5900_files="ChangeLog"
+if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
+       for i in $r5900_files ; do
+               if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
+                       if [ -n "${verbose}" ] ; then
+                               echo Keeping r5900 stuff in $i
+                       fi
+               fi
+       done
+else
+       for i in $r5900_files ; do
+               if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
+                       if [ -n "${verbose}" ] ; then
+                               echo Removing traces of \"r5900\" from $i...
+                       fi
+                       cp $i new
+                       sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
+                       if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
+                               if [ -n "${verbose}" ] ; then
+                                       echo Caching $i in .Recover...
+                               fi
+                               mv $i .Recover
+                       fi
+                       mv new $i
+               fi
+       done
+fi
+
 tx19_files="ChangeLog"
 if ( echo $* | grep keep\-tx19 > /dev/null ) ; then
        for i in $tx19_files ; do
index 5f2d6ec7550d75913de1d903c3a262acfe7f8f3c..6d77c793cd0aba550d458fe225a41cf22ce5878a 100644 (file)
@@ -1,3 +1,11 @@
+start-sanitize-r5900
+Tue Dec 16 12:54:30 1997  Jeffrey A Law  (law@cygnus.com)
+
+       * gas/mips/r5900.s: New testcase for r5900 insns.
+       * gas/mips/r5900.d: Support file for r5900 tests.
+       * gas/mips/mips.exp: Run r5900 tests too.
+
+end-sanitize-r5900
 start-sanitize-vr5400
 Mon Dec 15 10:34:15 1997  Jeffrey A Law  (law@cygnus.com)
 
index 904e7f5bb937fff93584beedb4cf80a0fc195c42..87f1b6393c0aef86bceb71d5bbb7fae540a5e7ae 100644 (file)
@@ -39,6 +39,30 @@ else
        done
 fi
 
+r5900_losers="r5900.s r5900.d"
+if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
+       keep_these_too="$keep_these_too $r5900_losers"
+       if [ -n "${verbose}" ] ; then
+               for i in $r5900_losers ; do
+                       echo Keeping $i
+               done
+       fi
+else
+       for i in $r5900_losers ; do
+               if [ -n "${verbose}" ] ; then
+                       echo Removing $i...
+               fi
+               if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
+                       if [ -n "${verbose}" ] ; then
+                               echo Caching $i in .Recover...
+                       fi
+                       mv $i .Recover
+               else
+                       rm $i
+               fi
+       done
+fi
+
 # All files listed between the "Things-to-keep:" line and the
 # "Files-to-sed:" line will be kept.  All other files will be removed.
 # Directories listed in this section will have their own Sanitize
@@ -224,4 +248,32 @@ else
        done
 fi
 
+r5900_files="mips.exp"
+if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
+       for i in $r5900_files ; do
+               if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
+                       if [ -n "${verbose}" ] ; then
+                               echo Keeping r5900 stuff in $i
+                       fi
+               fi
+       done
+else
+       for i in $r5900_files ; do
+               if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
+                       if [ -n "${verbose}" ] ; then
+                               echo Removing traces of \"r5900\" from $i...
+                       fi
+                       cp $i new
+                       sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
+                       if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
+                               if [ -n "${verbose}" ] ; then
+                                       echo Caching $i in .Recover...
+                               fi
+                               mv $i .Recover
+                       fi
+                       mv new $i
+               fi
+       done
+fi
+
 # End of file.
index 054e523a6392163b2fe6e25edae1ac77d3f440bb..4edbab6aba5aa695b4ad34a84707d127f8a44a21 100644 (file)
@@ -79,4 +79,7 @@ if [istarget mips*-*-*] then {
 # start-sanitize-vr5400
     run_dump_test "vr5400"
 # end-sanitize-vr5400
+# start-sanitize-r5900
+    run_dump_test "r5900"
+# end-sanitize-r5900
 }
diff --git a/gas/testsuite/gas/mips/r5900.d b/gas/testsuite/gas/mips/r5900.d
new file mode 100644 (file)
index 0000000..1fe66fa
--- /dev/null
@@ -0,0 +1,28 @@
+#objdump: -dr --prefix-addresses
+#name: MIPS R5900
+#as: -mcpu=r5900
+
+
+.*: +file format .*mips.*
+
+Disassembly of section \.text:
+0+0000 <stuff> di
+0+0004 <stuff\+4> ei
+0+0008 <stuff\+8> mfbpc        \$t2
+0+000c <stuff\+c> mfdab        \$t3
+0+0010 <stuff\+10> mfdabm      \$t4
+0+0014 <stuff\+14> mfdvb       \$t5
+0+0018 <stuff\+18> mfdvbm      \$t6
+0+001c <stuff\+1c> mfiab       \$t7
+0+0020 <stuff\+20> mfiabm      \$s0
+0+0024 <stuff\+24> mfpc        \$a0,\$1
+0+0028 <stuff\+28> mfps        \$a0,\$1
+0+002c <stuff\+2c> mtbpc       \$t2
+0+0030 <stuff\+30> mtdab       \$t3
+0+0034 <stuff\+34> mtdabm      \$t4
+0+0038 <stuff\+38> mtdvb       \$t5
+0+003c <stuff\+3c> mtdvbm      \$t6
+0+0040 <stuff\+40> mtiab       \$t7
+0+0044 <stuff\+44> mtiabm      \$s0
+0+0048 <stuff\+48> mtpc        \$a0,\$1
+0+004c <stuff\+4c> mtps        \$a0,\$1
diff --git a/gas/testsuite/gas/mips/r5900.s b/gas/testsuite/gas/mips/r5900.s
new file mode 100644 (file)
index 0000000..af1e1dd
--- /dev/null
@@ -0,0 +1,30 @@
+       .text
+
+stuff:
+       .ent stuff
+       /* Integer instructions.  */
+
+       /* Coprocessor 0 instructions, minus standard ISA 3 ones.
+          That leaves just the performance monitoring registers.  */
+
+       di
+       ei
+       mfbpc   $10
+       mfdab   $11
+       mfdabm  $12
+       mfdvb   $13
+       mfdvbm  $14
+       mfiab   $15
+       mfiabm  $16
+       mfpc    $4,$1
+       mfps    $4,$1
+       mtbpc   $10
+       mtdab   $11
+       mtdabm  $12
+       mtdvb   $13
+       mtdvbm  $14
+       mtiab   $15
+       mtiabm  $16
+       mtpc    $4,$1
+       mtps    $4,$1
+