sim: d10v: relocate tests & clean up test harness

This is the only target using a dir directly under testsuite/.  All
others use sim/<arch>/ instead.  Relocate it so all targets look the
same, and so we can leverage the common test harness.

We drop loop.s in the process because it was never referenced and
was just 2 lines of code.

All other test files are moved & have directives added to the top so
that the test harness can invoke them correctly.
This commit is contained in:
Mike Frysinger
2021-01-05 03:11:32 -05:00
parent 137d6efd8a
commit 29fd199ed8
58 changed files with 300 additions and 3434 deletions

View File

@ -1,4 +1,11 @@
2021-01-05 Mike Frysinger <vapier@gentoo.org> 2021-01-15 Mike Frysinger <vapier@gentoo.org>
* configure.ac (target): Delete d10v-*-elf case.
* configure: Regenerate.
* d10v-elf/: Move directory ...
* sim/d10v/: ... here.
2021-01-15 Mike Frysinger <vapier@gentoo.org>
* configure.ac (target): Delete mips64el-*-elf case. * configure.ac (target): Delete mips64el-*-elf case.
* configure: Regenerate. * configure: Regenerate.

View File

@ -582,11 +582,9 @@ PACKAGE_BUGREPORT=
PACKAGE_URL= PACKAGE_URL=
ac_unique_file="common/bits-tst.c" ac_unique_file="common/bits-tst.c"
enable_option_checking=no
ac_subst_vars='LTLIBOBJS ac_subst_vars='LTLIBOBJS
LIBOBJS LIBOBJS
sim_arch sim_arch
subdirs
target_os target_os
target_vendor target_vendor
target_cpu target_cpu
@ -645,7 +643,7 @@ enable_option_checking
ac_precious_vars='build_alias ac_precious_vars='build_alias
host_alias host_alias
target_alias' target_alias'
ac_subdirs_all='d10v-elf'
# Initialize some variables set by options. # Initialize some variables set by options.
ac_init_help= ac_init_help=
@ -1825,16 +1823,6 @@ test -n "$target_alias" &&
program_prefix=${target_alias}- program_prefix=${target_alias}-
# Configure sub-directory for appropriate targets
case ${target} in
d10v-*-elf )
subdirs="$subdirs d10v-elf"
;;
esac
# WHEN ADDING ENTRIES TO THIS MATRIX: # WHEN ADDING ENTRIES TO THIS MATRIX:
@ -3097,151 +3085,6 @@ if test "$no_create" != yes; then
# would make configure fail if this is the last instruction. # would make configure fail if this is the last instruction.
$ac_cs_success || as_fn_exit 1 $ac_cs_success || as_fn_exit 1
fi fi
#
# CONFIG_SUBDIRS section.
#
if test "$no_recursion" != yes; then
# Remove --cache-file, --srcdir, and --disable-option-checking arguments
# so they do not pile up.
ac_sub_configure_args=
ac_prev=
eval "set x $ac_configure_args"
shift
for ac_arg
do
if test -n "$ac_prev"; then
ac_prev=
continue
fi
case $ac_arg in
-cache-file | --cache-file | --cache-fil | --cache-fi \
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
ac_prev=cache_file ;;
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
| --c=*)
;;
--config-cache | -C)
;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
;;
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
ac_prev=prefix ;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
;;
--disable-option-checking)
;;
*)
case $ac_arg in
*\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
esac
done
# Always prepend --prefix to ensure using the same prefix
# in subdir configurations.
ac_arg="--prefix=$prefix"
case $ac_arg in
*\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
# Pass --silent
if test "$silent" = yes; then
ac_sub_configure_args="--silent $ac_sub_configure_args"
fi
# Always prepend --disable-option-checking to silence warnings, since
# different subdirs can have different --enable and --with options.
ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
ac_popdir=`pwd`
for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
# Do not complain, so a configure script can configure whichever
# parts of a large source tree are present.
test -d "$srcdir/$ac_dir" || continue
ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
$as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
$as_echo "$ac_msg" >&6
as_dir="$ac_dir"; as_fn_mkdir_p
ac_builddir=.
case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
# A ".." for each directory in $ac_dir_suffix.
ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
case $ac_top_builddir_sub in
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
esac ;;
esac
ac_abs_top_builddir=$ac_pwd
ac_abs_builddir=$ac_pwd$ac_dir_suffix
# for backward compatibility:
ac_top_builddir=$ac_top_build_prefix
case $srcdir in
.) # We are building in place.
ac_srcdir=.
ac_top_srcdir=$ac_top_builddir_sub
ac_abs_top_srcdir=$ac_pwd ;;
[\\/]* | ?:[\\/]* ) # Absolute name.
ac_srcdir=$srcdir$ac_dir_suffix;
ac_top_srcdir=$srcdir
ac_abs_top_srcdir=$srcdir ;;
*) # Relative name.
ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
ac_top_srcdir=$ac_top_build_prefix$srcdir
ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
esac
ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
cd "$ac_dir"
# Check for guested configure; otherwise get Cygnus style configure.
if test -f "$ac_srcdir/configure.gnu"; then
ac_sub_configure=$ac_srcdir/configure.gnu
elif test -f "$ac_srcdir/configure"; then
ac_sub_configure=$ac_srcdir/configure
elif test -f "$ac_srcdir/configure.in"; then
# This should be Cygnus configure.
ac_sub_configure=$ac_aux_dir/configure
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
ac_sub_configure=
fi
# The recursion is here.
if test -n "$ac_sub_configure"; then
# Make the cache file name correct relative to the subdirectory.
case $cache_file in
[\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
*) # Relative name.
ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
# The eval makes quoting arguments work.
eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
--cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
fi
cd "$ac_popdir"
done
fi
if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}

View File

@ -11,13 +11,6 @@ AC_SUBST(CC)
AC_CONFIG_AUX_DIR(../..) AC_CONFIG_AUX_DIR(../..)
AC_CANONICAL_SYSTEM AC_CANONICAL_SYSTEM
# Configure sub-directory for appropriate targets
case ${target} in
d10v-*-elf )
AC_CONFIG_SUBDIRS(d10v-elf)
;;
esac
sinclude(../configure.tgt) sinclude(../configure.tgt)
AC_OUTPUT(Makefile) AC_OUTPUT(Makefile)

View File

@ -1,180 +0,0 @@
# Makefile for regression testing the GNU debugger.
# Copyright (C) 1992-2021 Free Software Foundation, Inc.
# This file is part of GDB.
# 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 3 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, see <http://www.gnu.org/licenses/>.
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@
TESTS = \
exit47.ko \
hello.hi \
t-dbt.ok \
t-ld-st.ok \
t-mac.ok \
t-mvtac.ok \
t-mvtc.ok \
t-msbu.ok \
t-mulxu.ok \
t-rac.ok \
t-rachi.ok \
t-rdt.ok \
t-rep.ok \
t-rte.ok \
t-sac.ok \
t-sachi.ok \
t-sadd.ok \
t-slae.ok \
t-sp.ok \
t-sub2w.ok \
t-sub.ok \
t-subi.ok \
t-ae-ld-d.ok \
t-ae-ld-i.ok \
t-ae-ld-id.ok \
t-ae-ld-im.ok \
t-ae-ld-ip.ok \
t-ae-ld2w-d.ok \
t-ae-ld2w-i.ok \
t-ae-ld2w-id.ok \
t-ae-ld2w-im.ok \
t-ae-ld2w-ip.ok \
t-ae-st-d.ok \
t-ae-st-i.ok \
t-ae-st-id.ok \
t-ae-st-im.ok \
t-ae-st-ip.ok \
t-ae-st-is.ok \
t-ae-st2w-d.ok \
t-ae-st2w-i.ok \
t-ae-st2w-id.ok \
t-ae-st2w-im.ok \
t-ae-st2w-ip.ok \
t-ae-st2w-is.ok \
t-mod-ld-pre.ok \
t-rie-xx.ok \
#
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/d10v/run ]; then \
echo ../../../sim/d10v/run ; \
else \
echo $(target_alias)-run ; \
fi`
# Force d10v into operating mode.
RUNFLAGS_FOR_TARGET=--environment operating
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)
clean:
rm -f $(TESTS)
rm -f *.run *.o
rm -f core *.core
# Rules for running the tests
.SUFFIXES: .ok .run .hi .ko .ti
.run.ok:
rm -f tmp-$* $*.hi
ulimit -t 5 ; \
$(RUN_FOR_TARGET) $(RUNFLAGS_FOR_TARGET) $*.run > tmp-$*
mv tmp-$* $*.ok
.run.hi:
rm -f tmp-$* $*.hi diff-$*
ulimit -t 5 ; \
$(RUN_FOR_TARGET) $(RUNFLAGS_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) $(RUNFLAGS_FOR_TARGET) $*.run > tmp-$* ; \
if [ $$? -eq 47 ] ; then \
exit 0 ; \
else \
exit 1 ; \
fi
mv tmp-$* $*.ko
.run.ti:
rm -f tmp-$* $*.ti
set +e ; \
ulimit -t 5 ; \
$(RUN_FOR_TARGET) $(RUNFLAGS_FOR_TARGET) $(INTFLAGS_FOR_TARGET) $*.run > tmp-$*
test `cat tmp-$* | wc -l` -eq 10 < /dev/null
test `grep Tick tmp-$* | wc -l` -eq 10 < /dev/null
mv tmp-$* $*.ti
# Rules for building the test
# Preference is for obtaining the executable (.run) from a prebuilt image
.SUFFIXES: .uue .s .S .run
.uue.run:
head $* | grep $*.run > /dev/null
uudecode $*.uue
.run.u:
uuencode < $*.run $*.run > $*.u
.o.run:
$(LD_FOR_TARGET) $(LDFLAGS_FOR_TARGET) -o $*.run $*.o
.s.o:
$(AS_FOR_TARGET) $(ASFLAGS_FOR_TARGET) -I$(srcdir) $(srcdir)/$*.s -o $*.o
.S.o:
$(AS_FOR_TARGET) $(ASFLAGS_FOR_TARGET) -I$(srcdir) $(srcdir)/$*.S -o $*.o
Makefile: Makefile.in config.status
$(SHELL) ./config.status
config.status: configure
$(SHELL) ./config.status --recheck

File diff suppressed because it is too large Load Diff

View File

@ -1,18 +0,0 @@
dnl Process this file file with autoconf to produce a configure script.
dnl This file is a shell script fragment that supplies the information
dnl necessary to tailor a template configure script into the configure
dnl script appropriate for this directory. For more information, check
dnl any existing configure script.
dnl FIXME - think of a truly uniq file to this directory
AC_INIT(Makefile.in)
CC=${CC-cc}
AC_SUBST(CC)
AC_CONFIG_AUX_DIR(../../..)
AC_CANONICAL_SYSTEM
AC_SUBST(target_cpu)
AC_OUTPUT(Makefile)

View File

@ -1,4 +0,0 @@
.include "t-macros.i"
start
exit47

View File

@ -1,6 +0,0 @@
.text
.globl _start
_start:
bra _start
nop

View File

@ -1,3 +1,8 @@
2021-01-15 Mike Frysinger <vapier@gentoo.org>
* allinsn.exp: New file.
* configure, configure.ac, loop.s, Makefile.in: Deleted.
2020-10-06 Andrew Burgess <andrew.burgess@embecosm.com> 2020-10-06 Andrew Burgess <andrew.burgess@embecosm.com>
* configure: Regnerate. * configure: Regnerate.

View File

@ -0,0 +1,17 @@
# d10v simulator testsuite.
if [istarget d10v*-*] {
# load support procs (none yet)
# load_lib cgen.exp
# all machines
set all_machs "d10v"
foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.s]] {
# If we're only testing specific files and this isn't one of them,
# skip it.
if ![runtest_file_p $runtests $src] {
continue
}
run_sim_test $src $all_machs
}
}

View File

@ -1,5 +1,8 @@
# mach: all
# status: 47
# output:
.include "t-macros.i" .include "t-macros.i"
start start
exit47 exit47

View File

@ -1,3 +1,6 @@
# mach: all
# output: Hello World!\n
.include "t-macros.i" .include "t-macros.i"
start start

View File

@ -1,3 +1,7 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start
@ -5,7 +9,7 @@
PSW_BITS = 0 PSW_BITS = 0
point_dmap_at_imem point_dmap_at_imem
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld
ld r8,@0x4000 ld r8,@0x4000
test_ld: test_ld:
ld r8,@0x4001 ld r8,@0x4001

View File

@ -1,3 +1,7 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start
@ -5,7 +9,7 @@
PSW_BITS = 0 PSW_BITS = 0
point_dmap_at_imem point_dmap_at_imem
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld
ldi r10, #0x4000 ldi r10, #0x4000
ld r8, @r10 ld r8, @r10

View File

@ -1,3 +1,7 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start
@ -5,7 +9,7 @@
PSW_BITS = 0 PSW_BITS = 0
point_dmap_at_imem point_dmap_at_imem
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld
ldi r10, #0x4001 ldi r10, #0x4001
ld r8, @(1,r10) ld r8, @(1,r10)

View File

@ -1,3 +1,7 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start
@ -5,7 +9,7 @@
PSW_BITS = 0 PSW_BITS = 0
point_dmap_at_imem point_dmap_at_imem
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld
ldi r10, #0x4000 ldi r10, #0x4000
ld r8, @r10- ld r8, @r10-

View File

@ -1,3 +1,7 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start
@ -5,7 +9,7 @@
PSW_BITS = 0 PSW_BITS = 0
point_dmap_at_imem point_dmap_at_imem
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld
ldi r10, #0x4000 ldi r10, #0x4000
ld r8, @r10+ ld r8, @r10+

View File

@ -1,3 +1,7 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start
@ -5,7 +9,7 @@
PSW_BITS = 0 PSW_BITS = 0
point_dmap_at_imem point_dmap_at_imem
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld2w check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld2w
ld2w r8,@0x4000 ld2w r8,@0x4000
test_ld2w: test_ld2w:
ld2w r8,@0x4001 ld2w r8,@0x4001

View File

@ -1,3 +1,7 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start
@ -5,7 +9,7 @@
PSW_BITS = 0 PSW_BITS = 0
point_dmap_at_imem point_dmap_at_imem
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld2w check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld2w
ldi r10, #0x4000 ldi r10, #0x4000
ld2w r8, @r10 ld2w r8, @r10

View File

@ -1,3 +1,7 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start
@ -5,7 +9,7 @@
PSW_BITS = 0 PSW_BITS = 0
point_dmap_at_imem point_dmap_at_imem
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld2w check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld2w
ldi r10, #0x4001 ldi r10, #0x4001
ld2w r8,@(1,r10) ld2w r8,@(1,r10)
test_ld2w: test_ld2w:

View File

@ -1,3 +1,7 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start
@ -5,7 +9,7 @@
PSW_BITS = 0 PSW_BITS = 0
point_dmap_at_imem point_dmap_at_imem
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld2w check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld2w
ldi r10, #0x4000 ldi r10, #0x4000
ld2w r8, @r10- ld2w r8, @r10-

View File

@ -1,3 +1,7 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start
@ -5,7 +9,7 @@
PSW_BITS = 0 PSW_BITS = 0
point_dmap_at_imem point_dmap_at_imem
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld2w check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld2w
ldi r10, #0x4000 ldi r10, #0x4000
ld2w r8, @r10+ ld2w r8, @r10+

View File

@ -1,3 +1,7 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start
@ -5,7 +9,7 @@
PSW_BITS = 0 PSW_BITS = 0
point_dmap_at_imem point_dmap_at_imem
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st
st r8,@0x4000 st r8,@0x4000
test_st: test_st:
st r8,@0x4001 st r8,@0x4001

View File

@ -1,3 +1,7 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start
@ -5,7 +9,7 @@
PSW_BITS = 0 PSW_BITS = 0
point_dmap_at_imem point_dmap_at_imem
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st
ldi r10,#0x4000 ldi r10,#0x4000
st r8, @r10 st r8, @r10

View File

@ -1,3 +1,7 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start
@ -5,7 +9,7 @@
PSW_BITS = 0 PSW_BITS = 0
point_dmap_at_imem point_dmap_at_imem
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st
ldi r10,#0x4001 ldi r10,#0x4001
st r8, @(1,r10) st r8, @(1,r10)
test_st: test_st:

View File

@ -1,3 +1,7 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start
@ -5,7 +9,7 @@
PSW_BITS = 0 PSW_BITS = 0
point_dmap_at_imem point_dmap_at_imem
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st
ldi r10,#0x4000 ldi r10,#0x4000
st r8, @r10- st r8, @r10-

View File

@ -1,3 +1,7 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start
@ -5,7 +9,7 @@
PSW_BITS = 0 PSW_BITS = 0
point_dmap_at_imem point_dmap_at_imem
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st
ldi r10,#0x4000 ldi r10,#0x4000
st r8, @r10+ st r8, @r10+

View File

@ -1,3 +1,7 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start
@ -5,7 +9,7 @@
PSW_BITS = 0 PSW_BITS = 0
point_dmap_at_imem point_dmap_at_imem
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st
ldi sp,#0x4000 ldi sp,#0x4000
st r8, @-SP st r8, @-SP

View File

@ -1,3 +1,7 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start
@ -5,7 +9,7 @@
PSW_BITS = 0 PSW_BITS = 0
point_dmap_at_imem point_dmap_at_imem
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st2w check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st2w
st2w r8,@0x4000 st2w r8,@0x4000
test_st2w: test_st2w:
st2w r8,@0x4001 st2w r8,@0x4001

View File

@ -1,3 +1,7 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start
@ -5,7 +9,7 @@
PSW_BITS = 0 PSW_BITS = 0
point_dmap_at_imem point_dmap_at_imem
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st2w check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st2w
ldi r10, #0x4000 ldi r10, #0x4000
st2w r8, @r10 st2w r8, @r10

View File

@ -1,3 +1,7 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start
@ -5,7 +9,7 @@
PSW_BITS = 0 PSW_BITS = 0
point_dmap_at_imem point_dmap_at_imem
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st2w check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st2w
ldi r10, #0x4001 ldi r10, #0x4001
st2w r8, @(1,r10) st2w r8, @(1,r10)
test_st2w: test_st2w:

View File

@ -1,3 +1,7 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start
@ -5,7 +9,7 @@
PSW_BITS = 0 PSW_BITS = 0
point_dmap_at_imem point_dmap_at_imem
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st2w check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st2w
ldi r10, #0x4000 ldi r10, #0x4000
st2w r8, @r10- st2w r8, @r10-

View File

@ -1,3 +1,7 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start
@ -5,7 +9,7 @@
PSW_BITS = 0 PSW_BITS = 0
point_dmap_at_imem point_dmap_at_imem
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st2w check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st2w
ldi r10, #0x4000 ldi r10, #0x4000
st2w r8, @r10+ st2w r8, @r10+

View File

@ -1,3 +1,7 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start
@ -5,7 +9,7 @@
PSW_BITS = 0 PSW_BITS = 0
point_dmap_at_imem point_dmap_at_imem
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st2w check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st2w
ldi sp, #0x4004 ldi sp, #0x4004
st2w r8, @-SP st2w r8, @-SP

View File

@ -1,9 +1,14 @@
# mach: all
# output:
# sim: --environment operating
# as: -W
.include "t-macros.i" .include "t-macros.i"
start start
PSW_BITS = PSW_DM PSW_BITS = PSW_DM
;;; Blat our DMAP registers so that they point at on-chip imem ;;; Blat our DMAP registers so that they point at on-chip imem
ldi r2, MAP_INSN | 0xf ldi r2, MAP_INSN | 0xf

View File

@ -1,3 +1,7 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start

View File

@ -1,3 +1,7 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start
@ -22,7 +26,7 @@ test_macu2:
;; clear FX ;; clear FX
ldi r2, #0x8005 ldi r2, #0x8005
mvtc r2, cr0 mvtc r2, cr0

View File

@ -1,3 +1,7 @@
# mach: d10v
# output:
# sim: --environment operating
.macro start .macro start
.text .text
.align 2 .align 2
@ -158,12 +162,12 @@ _start:
.text .text
ldi r4, #1f ldi r4, #1f
ldi r5, \vec ldi r5, \vec
;; ;;
ld2w r2, @(0,r4) ld2w r2, @(0,r4)
st2w r2, @(0,r5) st2w r2, @(0,r5)
ld2w r2, @(4,r4) ld2w r2, @(4,r4)
st2w r2, @(4,r5) st2w r2, @(4,r5)
;; ;;
bra 9f bra 9f
nop nop
;;; Code that gets patched into the interrupt vector ;;; Code that gets patched into the interrupt vector
@ -185,7 +189,7 @@ _start:
exit2 exit2
4: exit0 4: exit0
;;; continue as normal ;;; continue as normal
9: 9:
.endm .endm
@ -229,5 +233,3 @@ _start:
VEC_SDBT = 0x3fff4 VEC_SDBT = 0x3fff4
VEC_DBI = 0x3ff58 VEC_DBI = 0x3ff58
VEC_EI = 0x3ff5c VEC_EI = 0x3ff5c

View File

@ -1,15 +1,15 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
.section .rodata start
.text
.globl main
.type main,@function
main:
mvfc r0, PSW || ldi.s r14, #0 mvfc r0, PSW || ldi.s r14, #0
ldi.l r2, 0x100 ; MOD_E ldi.l r2, 0x100 ; MOD_E
ldi.l r3, 0x108 ; MOD_S ldi.l r3, 0x108 ; MOD_S
test_mod_dec_ld: test_mod_dec_ld:
mvtc r2, MOD_E || bseti r0, #7 mvtc r2, MOD_E || bseti r0, #7
mvtc r3, MOD_S mvtc r3, MOD_S
@ -19,12 +19,12 @@ test_mod_dec_ld:
ld r4, @r1- || nop ; r1=0x104 ld r4, @r1- || nop ; r1=0x104
ld r4, @r1- || nop ; r1=0x102 ld r4, @r1- || nop ; r1=0x102
ld r4, @r1- || nop ; r1=0x100 ld r4, @r1- || nop ; r1=0x100
ld r4, @r1- || nop ; r1=0x108 ld r4, @r1- || nop ; r1=0x108
ld r4, @r1- || nop ; r1=0x106 ld r4, @r1- || nop ; r1=0x106
cmpeqi r1,#0x106 cmpeqi r1,#0x106
brf0f _ERR ; branch to error brf0f _ERR ; branch to error
test_mod_inc_ld: test_mod_inc_ld:
mvtc r2, MOD_S mvtc r2, MOD_S
mvtc r3, MOD_E mvtc r3, MOD_E
@ -35,22 +35,22 @@ test_mod_inc_ld:
ld r4, @r1+ || nop ; r1=0x108 ld r4, @r1+ || nop ; r1=0x108
ld r4, @r1+ || nop ; r1=0x100 ld r4, @r1+ || nop ; r1=0x100
ld r4, @r1+ || nop ; r1=0x102 ld r4, @r1+ || nop ; r1=0x102
cmpeqi r1,#0x102 cmpeqi r1,#0x102
brf0f _ERR brf0f _ERR
test_mod_dec_ld2w: test_mod_dec_ld2w:
mvtc r2, MOD_E mvtc r2, MOD_E
mvtc r3, MOD_S mvtc r3, MOD_S
mv r1,r3 ; r1=0x108 mv r1,r3 ; r1=0x108
ld2W r4, @r1- || nop ; r1=0x104 ld2W r4, @r1- || nop ; r1=0x104
ld2W r4, @r1- || nop ; r1=0x100 ld2W r4, @r1- || nop ; r1=0x100
ld2W r4, @r1- || nop ; r1=0x108 ld2W r4, @r1- || nop ; r1=0x108
ld2W r4, @r1- || nop ; r1=0x104 ld2W r4, @r1- || nop ; r1=0x104
cmpeqi r1,#0x104 cmpeqi r1,#0x104
brf0f _ERR ; <= branch to error brf0f _ERR ; <= branch to error
test_mod_inc_ld2w: test_mod_inc_ld2w:
mvtc r2, MOD_S mvtc r2, MOD_S
mvtc r3, MOD_E || BCLRI r0, #7 mvtc r3, MOD_E || BCLRI r0, #7
@ -59,10 +59,10 @@ test_mod_inc_ld2w:
ld2W r4, @r1+ || nop ; r1=0x108 ld2W r4, @r1+ || nop ; r1=0x108
ld2W r4, @r1+ || nop ; r1=0x100 ld2W r4, @r1+ || nop ; r1=0x100
ld2W r4, @r1+ || nop ; r1=0x104 ld2W r4, @r1+ || nop ; r1=0x104
cmpeqi r1,#0x104 cmpeqi r1,#0x104
brf0f _ERR brf0f _ERR
test_mod_dec_ld_dis: test_mod_dec_ld_dis:
mvtc r0, PSW ; modulo mode disable mvtc r0, PSW ; modulo mode disable
mvtc r2, MOD_E mvtc r2, MOD_E
@ -74,10 +74,10 @@ test_mod_dec_ld_dis:
ld r4, @r1- || nop ; r1=0x100 ld r4, @r1- || nop ; r1=0x100
ld r4, @r1- || nop ; r1=0xFE ld r4, @r1- || nop ; r1=0xFE
ld r4, @r1- || nop ; r1=0xFC ld r4, @r1- || nop ; r1=0xFC
cmpeqi r1,#0xFC cmpeqi r1,#0xFC
brf0f _ERR brf0f _ERR
test_mod_inc_ld_dis: test_mod_inc_ld_dis:
mvtc r2, MOD_S mvtc r2, MOD_S
mvtc r3, MOD_E mvtc r3, MOD_E
@ -88,10 +88,10 @@ test_mod_inc_ld_dis:
ld r4, @r1+ || nop ; r1=0x108 ld r4, @r1+ || nop ; r1=0x108
ld r4, @r1+ || nop ; r1=0x10A ld r4, @r1+ || nop ; r1=0x10A
ld r4, @r1+ || nop ; r1=0x10C ld r4, @r1+ || nop ; r1=0x10C
cmpeqi r1,#0x10C cmpeqi r1,#0x10C
brf0f _ERR brf0f _ERR
test_mod_dec_ld2w_dis: test_mod_dec_ld2w_dis:
mvtc r2, MOD_E mvtc r2, MOD_E
mvtc r3, MOD_S mvtc r3, MOD_S
@ -100,7 +100,7 @@ test_mod_dec_ld2w_dis:
ld2W r4, @r1- || nop ; r1=0x100 ld2W r4, @r1- || nop ; r1=0x100
ld2W r4, @r1- || nop ; r1=0xFC ld2W r4, @r1- || nop ; r1=0xFC
ld2W r4, @r1- || nop ; r1=0xF8 ld2W r4, @r1- || nop ; r1=0xF8
cmpeqi r1,#0xF8 cmpeqi r1,#0xF8
brf0f _ERR brf0f _ERR
@ -112,15 +112,15 @@ test_mod_dec_ld2w_dis:
ld2W r4, @r1+ || nop ; r1=0x108 ld2W r4, @r1+ || nop ; r1=0x108
ld2W r4, @r1+ || nop ; r1=0x10C ld2W r4, @r1+ || nop ; r1=0x10C
ld2W r4, @r1+ || nop ; r1=0x110 ld2W r4, @r1+ || nop ; r1=0x110
cmpeqi r1,#0x110 cmpeqi r1,#0x110
brf0f _ERR brf0f _ERR
_OK: _OK:
exit0 exit0
_ERR: _ERR:
exit47 exit47

View File

@ -1,3 +1,7 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start
@ -13,7 +17,7 @@ test_msbu1:
MSBU a1, r9, r8 MSBU a1, r9, r8
checkacc2 1 a1 0X7F 0x7FFF 0x8000 checkacc2 1 a1 0X7F 0x7FFF 0x8000
;; set FX ;; set FX
ldi r2, #0x8085 ldi r2, #0x8085
mvtc r2, cr0 mvtc r2, cr0

View File

@ -1,3 +1,7 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start
@ -13,7 +17,7 @@ test_mulxu1:
MULXU a1, r9, r8 MULXU a1, r9, r8
checkacc2 1 a1 0x00 0x8000 0x7FFF checkacc2 1 a1 0x00 0x8000 0x7FFF
;; set FX ;; set FX
ldi r2, #0x8085 ldi r2, #0x8085
mvtc r2, cr0 mvtc r2, cr0

View File

@ -1,3 +1,7 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start
@ -8,7 +12,7 @@
mvtacg r0, a0 mvtacg r0, a0
checkacc2 2 a0 0x00 0xffff 0xbeef checkacc2 2 a0 0x00 0xffff 0xbeef
ldi r8, 0xdead ldi r8, 0xdead
mvtachi r8, a0 mvtachi r8, a0
checkacc2 3 a0 0xff 0xdead 0xbeef checkacc2 3 a0 0xff 0xdead 0xbeef

View File

@ -1,3 +1,8 @@
# mach: all
# output:
# sim: --environment operating
# as: -W
.include "t-macros.i" .include "t-macros.i"
start start
@ -32,7 +37,7 @@
checkpsw2 9 PSW_FX|PSW_ST checkpsw2 9 PSW_FX|PSW_ST
;; loadpsw2 PSW_ST ;; loadpsw2 PSW_ST
;; checkpsw2 10 ;; checkpsw2 10
loadpsw2 PSW_10 loadpsw2 PSW_10
checkpsw2 11 0 ;; PSW_10 checkpsw2 11 0 ;; PSW_10
@ -59,7 +64,7 @@
mvtc r6, cr10 mvtc r6, cr10
ldi r6, #0xbeef ldi r6, #0xbeef
mvtc r6, cr11 mvtc r6, cr11
mvfc r7, cr10 mvfc r7, cr10
check 17 r7 0xdeac check 17 r7 0xdeac
mvfc r7, cr11 mvfc r7, cr11

View File

@ -1,3 +1,7 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start

View File

@ -1,3 +1,7 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start

View File

@ -1,9 +1,14 @@
# mach: all
# output:
# sim: --environment operating
# as: -W
.include "t-macros.i" .include "t-macros.i"
start start
PSW_BITS = PSW_C|PSW_F0|PSW_F1 PSW_BITS = PSW_C|PSW_F0|PSW_F1
ldi r6, #success@word ldi r6, #success@word
mvtc r6, dpc mvtc r6, dpc
ldi r6, #PSW_BITS ldi r6, #PSW_BITS

View File

@ -1,12 +1,16 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start
;; Check that the instruction @REP_E is executed when it ;; Check that the instruction @REP_E is executed when it
;; is reached using a branch instruction ;; is reached using a branch instruction
ldi r2, 1 ldi r2, 1
test_rep_1: test_rep_1:
rep r2, end_rep_1 rep r2, end_rep_1

View File

@ -1,3 +1,7 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start
@ -5,7 +9,7 @@
PSW_BITS = 0 PSW_BITS = 0
point_dmap_at_imem point_dmap_at_imem
check_interrupt (VEC_RIE&DMAP_MASK)+DMAP_BASE PSW_BITS test_rie_xx check_interrupt (VEC_RIE&DMAP_MASK)+DMAP_BASE PSW_BITS test_rie_xx
test_rie_xx: test_rie_xx:
.short 0xe120, 0x0000 ;; Example of RIE code .short 0xe120, 0x0000 ;; Example of RIE code
nop nop

View File

@ -1,9 +1,13 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start
PSW_BITS = PSW_C|PSW_F0|PSW_F1 PSW_BITS = PSW_C|PSW_F0|PSW_F1
ldi r6, #success@word ldi r6, #success@word
mvtc r6, bpc mvtc r6, bpc
ldi r6, #PSW_BITS ldi r6, #PSW_BITS

View File

@ -1,3 +1,7 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start

View File

@ -1,3 +1,7 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start

View File

@ -1,3 +1,7 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start
@ -13,7 +17,7 @@
checkacc2 1 a0 0x00 0x7fff 0xffff checkacc2 1 a0 0x00 0x7fff 0xffff
checkacc2 2 a1 0xff 0x8000 0x7fff checkacc2 2 a1 0xff 0x8000 0x7fff
;; Test overflow ;; Test overflow
loadacc2 a0 0x00 0x0000 0x0000 loadacc2 a0 0x00 0x0000 0x0000
loadacc2 a1 0x01 0x8000 0x0000 loadacc2 a1 0x01 0x8000 0x0000

View File

@ -1,3 +1,7 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start

View File

@ -1,3 +1,7 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start
@ -8,7 +12,7 @@
ldi sp, 0xdead ldi sp, 0xdead
loadpsw2 PSW_SM loadpsw2 PSW_SM
ldi sp, 0xbeef ldi sp, 0xbeef
loadpsw2 0 loadpsw2 0
check 1 sp 0xdead check 1 sp 0xdead
loadpsw2 PSW_SM loadpsw2 PSW_SM

View File

@ -1,3 +1,7 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start

View File

@ -1,3 +1,7 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start
@ -5,11 +9,11 @@
;; The d10v implements negated addition for subtraction ;; The d10v implements negated addition for subtraction
.macro check_sub2w s x y r c v .macro check_sub2w s x y r c v
;; clear carry ;; clear carry
ldi r6,#0x8004 ldi r6,#0x8004
mvtc r6,cr0 mvtc r6,cr0
;; load opnds ;; load opnds
ld2w r6, @(1f,r0) ld2w r6, @(1f,r0)
ld2w r8, @(2f,r0) ld2w r8, @(2f,r0)
@ -17,10 +21,10 @@
1: .long \x 1: .long \x
2: .long \y 2: .long \y
.text .text
;; subtract ;; subtract
SUB2W r6, r8 SUB2W r6, r8
;; verify result ;; verify result
ld2w r10, @(1f,r0) ld2w r10, @(1f,r0)
.data .data
@ -34,7 +38,7 @@
ldi r0, \s ldi r0, \s
trap 15 trap 15
3: 3:
;; verify carry ;; verify carry
mvfc r6, cr0 mvfc r6, cr0
and3 r6, r6, #1 and3 r6, r6, #1
@ -45,7 +49,7 @@
trap 15 trap 15
1: 1:
.endm .endm
check_sub2w 1 0x00000000 0x00000000 0x00000000 1 0 check_sub2w 1 0x00000000 0x00000000 0x00000000 1 0
check_sub2w 2 0x00000000 0x00000001 0xffffffff 0 0 check_sub2w 2 0x00000000 0x00000001 0xffffffff 0 0
check_sub2w 3 0x00000001 0x00000000 0x00000001 1 0 check_sub2w 3 0x00000001 0x00000000 0x00000001 1 0

View File

@ -1,3 +1,7 @@
# mach: all
# output:
# sim: --environment operating
.include "t-macros.i" .include "t-macros.i"
start start

View File

@ -0,0 +1,10 @@
# mach: all
# status: 47
# output:
# sim: --environment operating
.include "t-macros.i"
start
exit47