From 0f63020ed86d843eccbf1bf9db7eab34bf704a37 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Tue, 16 Dec 1997 11:54:21 +0000 Subject: [PATCH] * 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. --- gas/testsuite/.Sanitize | 28 +++++++++++++++++ gas/testsuite/ChangeLog | 8 +++++ gas/testsuite/gas/mips/.Sanitize | 52 ++++++++++++++++++++++++++++++++ gas/testsuite/gas/mips/mips.exp | 3 ++ gas/testsuite/gas/mips/r5900.d | 28 +++++++++++++++++ gas/testsuite/gas/mips/r5900.s | 30 ++++++++++++++++++ 6 files changed, 149 insertions(+) create mode 100644 gas/testsuite/gas/mips/r5900.d create mode 100644 gas/testsuite/gas/mips/r5900.s diff --git a/gas/testsuite/.Sanitize b/gas/testsuite/.Sanitize index 6362072b9a0..68a74f4e1cf 100644 --- a/gas/testsuite/.Sanitize +++ b/gas/testsuite/.Sanitize @@ -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 diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 5f2d6ec7550..6d77c793cd0 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -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) diff --git a/gas/testsuite/gas/mips/.Sanitize b/gas/testsuite/gas/mips/.Sanitize index 904e7f5bb93..87f1b6393c0 100644 --- a/gas/testsuite/gas/mips/.Sanitize +++ b/gas/testsuite/gas/mips/.Sanitize @@ -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. diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp index 054e523a639..4edbab6aba5 100644 --- a/gas/testsuite/gas/mips/mips.exp +++ b/gas/testsuite/gas/mips/mips.exp @@ -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 index 00000000000..1fe66fa2dd3 --- /dev/null +++ b/gas/testsuite/gas/mips/r5900.d @@ -0,0 +1,28 @@ +#objdump: -dr --prefix-addresses +#name: MIPS R5900 +#as: -mcpu=r5900 + + +.*: +file format .*mips.* + +Disassembly of section \.text: +0+0000 di +0+0004 ei +0+0008 mfbpc \$t2 +0+000c mfdab \$t3 +0+0010 mfdabm \$t4 +0+0014 mfdvb \$t5 +0+0018 mfdvbm \$t6 +0+001c mfiab \$t7 +0+0020 mfiabm \$s0 +0+0024 mfpc \$a0,\$1 +0+0028 mfps \$a0,\$1 +0+002c mtbpc \$t2 +0+0030 mtdab \$t3 +0+0034 mtdabm \$t4 +0+0038 mtdvb \$t5 +0+003c mtdvbm \$t6 +0+0040 mtiab \$t7 +0+0044 mtiabm \$s0 +0+0048 mtpc \$a0,\$1 +0+004c mtps \$a0,\$1 diff --git a/gas/testsuite/gas/mips/r5900.s b/gas/testsuite/gas/mips/r5900.s new file mode 100644 index 00000000000..af1e1dd31d1 --- /dev/null +++ b/gas/testsuite/gas/mips/r5900.s @@ -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 + -- 2.30.2