diff options
author | Andrew Cagney <cagney@redhat.com> | 1998-05-21 09:32:07 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 1998-05-21 09:32:07 +0000 |
commit | 26feb3a83d605a9f2302266d524e6e443d31d197 (patch) | |
tree | ed8c52a6f5e6dafaf69517e04c76a8a54a96d6a1 /sim/testsuite/mips64r5900-elf | |
parent | 84048259930b9dc812404285e3508eb09beeec51 (diff) | |
download | gdb-26feb3a83d605a9f2302266d524e6e443d31d197.zip gdb-26feb3a83d605a9f2302266d524e6e443d31d197.tar.gz gdb-26feb3a83d605a9f2302266d524e6e443d31d197.tar.bz2 |
Fix sign extension on 32 bit add/sub instructions.
Diffstat (limited to 'sim/testsuite/mips64r5900-elf')
-rw-r--r-- | sim/testsuite/mips64r5900-elf/ChangeLog | 44 | ||||
-rw-r--r-- | sim/testsuite/mips64r5900-elf/Makefile.in | 271 | ||||
-rw-r--r-- | sim/testsuite/mips64r5900-elf/t-sub.s | 26 |
3 files changed, 341 insertions, 0 deletions
diff --git a/sim/testsuite/mips64r5900-elf/ChangeLog b/sim/testsuite/mips64r5900-elf/ChangeLog index 11b7fac..d1ad04e 100644 --- a/sim/testsuite/mips64r5900-elf/ChangeLog +++ b/sim/testsuite/mips64r5900-elf/ChangeLog @@ -1,6 +1,50 @@ +Thu May 21 19:04:52 1998 Andrew Cagney <cagney@b1.cygnus.com> + + * Makefile.in (TESTS): Add t-sub.ok. + (t-sub.s): New file. + +Thu May 14 14:43:17 1998 Andrew Cagney <cagney@b1.cygnus.com> + + * t-div.s, t-ddiv.s, t-div1.s: Check DIV for x/0 and MIN_INT/-1. + * t-divu1.s, t-divu.s: Check x/0 and x/MAX_INT. + * t-dadd: Test. + * trap.s: Test trap instruction. + * Makefile.in (TESTS): Update + + * f-add.s, f-adda.s, f-madd.s, f-madda.s, f-msub.s, f-msuba.s: Add + more test cases. + +Thu Apr 30 18:57:47 1998 Andrew Cagney <cagney@b1.cygnus.com> + + * f-adda.s: Handle to-the-max accumulator values in madd.s. + + * t-macros.i: Use msub.s instead of madd.s to get a value from the + accumulator. Use suba.s instead of adda.s to get a value into the + accumulator. + +Thu Apr 16 17:44:17 1998 Andrew Cagney <cagney@b1.cygnus.com> + + * f-mul.s, f-mula.s: More overflow/underflow tests. + + * f-cvt.s: Swap cvt.w.s and cvt.s.w was testing backwards. + + * t-macros.i (loadfpx, checkfpx, checkaccx): Define, accept hex + values. + (checkfp): Force FP-SCR register bit zero to 1 when checking. + +Wed Feb 25 20:26:29 1998 Andrew Cagney <cagney@b1.cygnus.com> + + * f-*.s: New files. + + * Makefile.in (TESTS): Add floating point f-* tests. + + * t-macros.i: Add lots of floating point macros. + Mon Feb 2 16:50:21 1998 Andrew Cagney <cagney@b1.cygnus.com> * t-sdl.s: New test. + (dest): 8 byte align sdl destination. + * Makefile.in: Update. Wed Sep 3 14:32:42 1997 Andrew Cagney <cagney@b1.cygnus.com> diff --git a/sim/testsuite/mips64r5900-elf/Makefile.in b/sim/testsuite/mips64r5900-elf/Makefile.in new file mode 100644 index 0000000..120337e --- /dev/null +++ b/sim/testsuite/mips64r5900-elf/Makefile.in @@ -0,0 +1,271 @@ +# Makefile for regression testing the GNU debugger. +# Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. + +# This file is part of GDB. + +# GDB 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, or (at your option) +# any later version. + +# GDB 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. + +VPATH = @srcdir@ +srcdir = @srcdir@ +srcroot = $(srcdir)/.. + +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +host_alias = @host_alias@ +target_alias = @target_alias@ +program_transform_name = @program_transform_name@ +build_canonical = @build@ +host_canonical = @host@ +target_canonical = @target@ +target_cpu = @target_cpu@ + + +SHELL = /bin/sh +SUBDIRS = @subdirs@ +RPATH_ENVVAR = @RPATH_ENVVAR@ + +EXPECT = `if [ -f $${rootme}/../../expect/expect ] ; then \ + echo $${rootme}/../../expect/expect ; \ + else echo expect ; fi` + +RUNTEST = $(RUNTEST_FOR_TARGET) + +RUNTESTFLAGS = + +RUNTEST_FOR_TARGET = `\ + if [ -f $${srcdir}/../../../dejagnu/runtest ]; then \ + echo $${srcdir}/../../../dejagnu/runtest; \ + else \ + if [ "$(host_canonical)" = "$(target_canonical)" ]; then \ + echo runtest; \ + else \ + t='$(program_transform_name)'; echo runtest | sed -e '' $$t; \ + fi; \ + fi` + + +AS_FOR_TARGET = `\ + if [ -x ../../../gas/as-new ]; then \ + echo ../../../gas/as-new ; \ + else \ + echo $(target_alias)-as ; \ + fi` + +LD_FOR_TARGET = `\ + if [ -x ../../../ld/ld-new ]; then \ + echo ../../../ld/ld-new ; \ + else \ + echo $(target_alias)-ld ; \ + fi` + +RUN_FOR_TARGET = `\ + if [ -x ../../../sim/mips/run ]; then \ + echo ../../../sim/mips/run ; \ + else \ + echo $(target_alias)-run ; \ + fi` + +TESTS = \ + hello.hi \ + exit47.ko \ + \ + f-abs.ok \ + f-add.ok \ + f-adda.ok \ + $(f-bc1f.ok) \ + $(f-bc1fl.ok) \ + $(f-bc1t.ok) \ + $(f-bc1tl.ok) \ + f-cond.ok \ + $(f-cfc1.ok) \ + $(f-ctc1.ok) \ + f-cvt.ok \ + f-div.ok \ + $(f-lwc1.ok) \ + f-madd.ok \ + f-madda.ok \ + f-max.ok \ + $(f-mfc1.ok) \ + f-min.ok \ + f-msub.ok \ + f-msuba.ok \ + $(f-mtc1.ok) \ + f-mul.ok \ + f-mula.ok \ + f-neg.ok \ + f-rsqrt.ok \ + f-sqrt.ok \ + f-sub.ok \ + f-suba.ok \ + $(f-swc1.ok) \ + \ + t-dadd.ok \ + t-ddiv.ok \ + t-div.ok \ + t-div1.ok \ + t-divu.ok \ + t-divu1.ok \ + t-sub.ok \ + \ + t-mtsa.ok \ + t-pabsh.ok \ + t-pabsw.ok \ + t-paddb.ok \ + t-paddsb.ok \ + t-paddsh.ok \ + t-paddsw.ok \ + t-paddub.ok \ + t-padduh.ok \ + t-padduw.ok \ + t-pcpyh.ok \ + t-pdivbw.ok \ + t-pdivuw.ok \ + t-pdivw.ok \ + t-pexcw.ok \ + t-pexoh.ok \ + t-pext5.ok \ + t-pextlb.ok \ + t-pextlh.ok \ + t-pextlw.ok \ + t-pextub.ok \ + t-pextuh.ok \ + t-pextuw.ok \ + t-phmaddh.ok \ + t-phmsubh.ok \ + t-pinth.ok \ + t-pintoh.ok \ + t-pmaddh.ok \ + t-pmadduw.ok \ + t-pmaddw.ok \ + t-pmfhl-lh.ok \ + t-pmfhl-lw.ok \ + t-pmfhl-sh.ok \ + t-pmfhl-slw.ok \ + t-pmfhl-uw.ok \ + t-pmsubh.ok \ + t-pmthl-lw.ok \ + t-pmulth.ok \ + t-pmultuw.ok \ + t-pmultw.ok \ + t-ppac5.ok \ + t-ppacb.ok \ + t-ppach.ok \ + t-ppacw.ok \ + t-prot3w.ok \ + t-psllvw.ok \ + t-psrlvw.ok \ + t-psravw.ok \ + t-psubsb.ok \ + t-psubsh.ok \ + t-psubsw.ok \ + t-psubub.ok \ + t-psubuh.ok \ + t-psubuw.ok \ + t-psubw.ok \ + t-qfsrv.ok \ + t-sdl.ok \ + \ + trap.ok \ + +check: sanity $(TESTS) +sanity: + @eval echo AS_FOR_TARGET = $(AS_FOR_TARGET) + @eval echo LD_FOR_TARGET = $(LD_FOR_TARGET) + @eval echo RUN_FOR_TARGET = $(RUN_FOR_TARGET) + + + +# Rules for running all the tests, put into three types +# exit success, exit fail, print "Hello World" + +.u.log: + uudecode $*.u + $(RUN_FOR_TARGET) $* > $*.log + + +# Rules for running the tests + +.SUFFIXES: .u .uue .ok .ok .run .hi .ko .ko +.run.ok: + rm -f tmp-$* $*.ok + ulimit -t 5 ; $(RUN_FOR_TARGET) $*.run > tmp-$* + mv tmp-$* $*.ok +.run.hi: + rm -f tmp-$* $*.hi diff-$* + ulimit -t 5 ; $(RUN_FOR_TARGET) $*.run > tmp-$* + echo 'Hello World!' | diff - tmp-$* > diff-$* + cat tmp-$* diff-$* > $*.hi +.run.ko: + rm -f tmp-$* $*.ko + set +e ; \ + ulimit -t 5 ; $(RUN_FOR_TARGET) $*.run > tmp-$* ; \ + if [ $$? -eq 47 ] ; then \ + exit 0 ; \ + else \ + exit 1 ; \ + fi + mv tmp-$* $*.ko + + +# Rules for building all the tests and packing them into +# uuencoded files. + +.run.u: + uuencode < $*.run $*.run > $*.u + @echo "Move $*.u $*.uue" +.uue.run: + uudecode $(srcdir)/$*.uue +.o.run: + $(LD_FOR_TARGET) -Ttext 0xa0020000 -o $*.run $*.o +.s.o: + $(AS_FOR_TARGET) -I $(srcdir) $(srcdir)/$*.s -o $*.o + + +# +# Standard +# +clean mostlyclean: + -rm -f *~ core *.o a.out *.x *.grt *.run tmp-* diff-* + rm -f $(TESTS) +# if [ x"${SUBDIRS}" != x ] ; then \ +# for dir in ${SUBDIRS}; \ +# do \ +# echo "$$dir:"; \ +# if [ -d $$dir ]; then \ +# (cd $$dir; $(MAKE) clean); \ +# fi; \ +# done ; \ +# else true; fi + +distclean maintainer-clean realclean: clean + -rm -f *~ core + -rm -f Makefile config.status *-init.exp + -rm -fr *.log summary detail *.plog *.sum *.psum site.* +# if [ x"${SUBDIRS}" != x ] ; then \ +# for dir in ${SUBDIRS}; \ +# do \ +# echo "$$dir:"; \ +# if [ -d $$dir ]; then \ +# (cd $$dir; $(MAKE) distclean); \ +# fi; \ +# done ; \ +# else true; fi + +Makefile : Makefile.in config.status + $(SHELL) config.status + +config.status: configure + $(SHELL) config.status --recheck diff --git a/sim/testsuite/mips64r5900-elf/t-sub.s b/sim/testsuite/mips64r5900-elf/t-sub.s new file mode 100644 index 0000000..ef314ae --- /dev/null +++ b/sim/testsuite/mips64r5900-elf/t-sub.s @@ -0,0 +1,26 @@ +.include "t-macros.i" + + start + +test_sub: + + load $7 0x0000000000000000 0xffffffff80000001 + load $8 0x0000000000000000 0xffffffffffffffff + sub $10, $7, $8 + check10 0x0000000000000000 0xffffffff80000002 + +test_sub2: + load $7 0x0000000000000000 0xffffffff80000001 + load $8 0x0000000000000000 0x0000000000000001 + sub $10, $7, $8 + check10 0x0000000000000000 0xffffffff80000000 + + +test_sub3: + load $7 0x0000000000000000 0x0000000000000001 + load $8 0x0000000000000000 0x0000000000000002 + sub $10, $7, $8 + check10 0x0000000000000000 0xffffffffffffffff + + + exit0 |