From 13120c031c807797cd5bc5a8eaddd09989c0881e Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Mon, 7 Aug 1995 09:04:27 +0000 Subject: [PATCH] * gas/sh/*: New tests for the hitachi-sh. Sanitized away for now... --- gas/testsuite/.Sanitize | 21 ++++++++ gas/testsuite/ChangeLog | 19 ++++++++ gas/testsuite/gas/.Sanitize | 1 + gas/testsuite/gas/sh/.Sanitize | 33 +++++++++++++ gas/testsuite/gas/sh/basic.exp | 87 ++++++++++++++++++++++++++++++++++ 5 files changed, 161 insertions(+) create mode 100644 gas/testsuite/gas/sh/.Sanitize create mode 100755 gas/testsuite/gas/sh/basic.exp diff --git a/gas/testsuite/.Sanitize b/gas/testsuite/.Sanitize index 509284a1f9f..c4a9d9c86ce 100644 --- a/gas/testsuite/.Sanitize +++ b/gas/testsuite/.Sanitize @@ -74,4 +74,25 @@ else done fi +sh3e_files="ChangeLog" +if ( echo $* | grep keep\-sh3e > /dev/null ) ; then + if [ -n "${verbose}" ] ; then + echo Keeping sh3e stuff in $sh3e_files. + fi +else + if [ -n "${verbose}" ]; then + echo -n Cleaning sh3e in `pwd`: + fi + for f in $sh3e_files ; do + if [ -n "${verbose}" ] ; then + echo -n " " $f + fi + sed -e '/start\-sanitize\-sh3e/,/end\-sanitize\-sh3e/d' -e '/ xl /d' < $f > new + if [ -n "${safe}" ] ; then + mv $f .Recover + fi + mv new $f + done +fi + # End of file. diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index dd00baa6aa6..0e2428331c8 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,22 @@ +start-sanitize-sh3e +Mon Aug 7 03:01:32 1995 Jeff Law (law@snake.cs.utah.edu) + + * gas/sh/*: New tests for the hitachi-sh. + +end-sanitize-sh3e +Tue Aug 1 18:02:47 1995 Ian Lance Taylor + + * gas/mri/*: New tests for MRI mode. + + * lib/gas-defs.exp (run_dump_test): Support using objcopy. Dump + program executions to the log file before running them. Use the + simple program name, rather than the path to the binary being run, + in pass/fail messages. + (regexp_diff): If the regexp file has the special comment #pass, + stop checking at that point. + * config/default.exp: Set NM, NMFLAGS, OBJCOPY, and OBJCOPYFLAGS, + if they are not already set. + Tue Aug 1 11:41:30 1995 steve chamberlain * Makefile.in: Remove superfluous runtest gasp. diff --git a/gas/testsuite/gas/.Sanitize b/gas/testsuite/gas/.Sanitize index 7f8fc981265..f4cb7c69952 100644 --- a/gas/testsuite/gas/.Sanitize +++ b/gas/testsuite/gas/.Sanitize @@ -48,6 +48,7 @@ template vax Things-to-lose: +sh Do-last: diff --git a/gas/testsuite/gas/sh/.Sanitize b/gas/testsuite/gas/sh/.Sanitize new file mode 100644 index 00000000000..c9d063b18ff --- /dev/null +++ b/gas/testsuite/gas/sh/.Sanitize @@ -0,0 +1,33 @@ +# Sanitize.in for devo. + +# Each directory to survive it's way into a release will need a file +# like this one called "./.Sanitize". All keyword lines must exist, +# and must exist in the order specified by this file. Each directory +# in the tree will be processed, top down, in the following order. + +# Hash started lines like this one are comments and will be deleted +# before anything else is done. Blank lines will also be squashed +# out. + +# The lines between the "Do-first:" line and the "Things-to-keep:" +# line are executed as a /bin/sh shell script before anything else is +# done in this + +Do-first: + + +# 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 +# called. Directories not listed will be removed in their entirety +# with rm -rf. + +Things-to-keep: + +Things-to-lose: +basic.exp +fp.s + +Do-last: + +# End of file. diff --git a/gas/testsuite/gas/sh/basic.exp b/gas/testsuite/gas/sh/basic.exp new file mode 100755 index 00000000000..5cbb9af09d9 --- /dev/null +++ b/gas/testsuite/gas/sh/basic.exp @@ -0,0 +1,87 @@ +# Copyright (C) 1995 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +# Please email any bugs, comments, and/or additions to this file to: +# DejaGnu@cygnus.com + +# Written by Cygnus Support. + +proc do_fp {} { + set testname "fp.s: floating point tests (sh3e)" + set x 0 + + gas_start "fp.s" "-al" + + # Check the assembled instruction against a table built by the HP assembler + # Any differences should be checked by hand -- with the number of problems + # I've seen in the HP assembler I don't completely trust it. + # + # Instead of having a variable for each match string just increment the + # total number of matches seen. That's simpler when testing large numbers + # of instructions (as these tests to). + while 1 { + expect { + -re "^ +\[0-9\]+ 0000 F008\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 0002 F00A\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 0004 F009\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 0006 F00B\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 0008 F006\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 000a F007\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 000c F10C\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 000e F08D\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 0010 F09D\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 0012 F100\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 0014 F101\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 0016 F102\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 0018 F103\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 001a F10E\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 001c F104\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 001e F105\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 0020 F07D\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 0022 F04D\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 0024 F05D\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 0026 F06D\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 0028 F02D\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 002a F03D\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 002c F00D\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 002e F01D\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 0030 435A\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 0032 4356\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 0034 436A\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 0036 4366\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 0038 435A\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 003a 4356\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 003c 436A\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 003e 4366\[^\n\]*\n" { set x [expr $x+1] } + -re "\[^\n\]*\n" { } + timeout { perror "timeout\n"; break } + eof { break } + } + } + + # This was intended to do any cleanup necessary. It kinda looks like it + # isn't needed, but just in case, please keep it in for now. + gas_finish + + # Did we find what we were looking for? If not, flunk it. + if [expr $x==32] then { pass $testname } else { fail $testname } +} + + +if [istarget sh*-*-*] then { + # Test the basic instruction parser. + do_fp +} -- 2.30.2