public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Subject: [PATCH] sim: d10v: relocate tests & clean up test harness
Date: Tue,  5 Jan 2021 03:17:05 -0500	[thread overview]
Message-ID: <20210105081705.1422-1-vapier@gentoo.org> (raw)
In-Reply-To: <20210105065548.9260-1-vapier@gentoo.org>

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.
---
 sim/testsuite/ChangeLog                       |    7 +
 sim/testsuite/configure                       |  159 +-
 sim/testsuite/configure.ac                    |    7 -
 sim/testsuite/d10v-elf/Makefile.in            |  180 -
 sim/testsuite/d10v-elf/configure              | 2984 -----------------
 sim/testsuite/d10v-elf/configure.ac           |   18 -
 sim/testsuite/d10v-elf/exit47.s               |    4 -
 sim/testsuite/d10v-elf/loop.s                 |    6 -
 .../{d10v-elf => sim/d10v}/ChangeLog          |    5 +
 sim/testsuite/sim/d10v/allinsn.exp            |   17 +
 .../{d10v-elf/t-trap.s => sim/d10v/exit47.s}  |    5 +-
 sim/testsuite/{d10v-elf => sim/d10v}/hello.s  |    3 +
 .../{d10v-elf => sim/d10v}/t-ae-ld-d.s        |    6 +-
 .../{d10v-elf => sim/d10v}/t-ae-ld-i.s        |    6 +-
 .../{d10v-elf => sim/d10v}/t-ae-ld-id.s       |    6 +-
 .../{d10v-elf => sim/d10v}/t-ae-ld-im.s       |    6 +-
 .../{d10v-elf => sim/d10v}/t-ae-ld-ip.s       |    6 +-
 .../{d10v-elf => sim/d10v}/t-ae-ld2w-d.s      |    6 +-
 .../{d10v-elf => sim/d10v}/t-ae-ld2w-i.s      |    6 +-
 .../{d10v-elf => sim/d10v}/t-ae-ld2w-id.s     |    6 +-
 .../{d10v-elf => sim/d10v}/t-ae-ld2w-im.s     |    6 +-
 .../{d10v-elf => sim/d10v}/t-ae-ld2w-ip.s     |    6 +-
 .../{d10v-elf => sim/d10v}/t-ae-st-d.s        |    6 +-
 .../{d10v-elf => sim/d10v}/t-ae-st-i.s        |    6 +-
 .../{d10v-elf => sim/d10v}/t-ae-st-id.s       |    6 +-
 .../{d10v-elf => sim/d10v}/t-ae-st-im.s       |    6 +-
 .../{d10v-elf => sim/d10v}/t-ae-st-ip.s       |    6 +-
 .../{d10v-elf => sim/d10v}/t-ae-st-is.s       |    6 +-
 .../{d10v-elf => sim/d10v}/t-ae-st2w-d.s      |    6 +-
 .../{d10v-elf => sim/d10v}/t-ae-st2w-i.s      |    6 +-
 .../{d10v-elf => sim/d10v}/t-ae-st2w-id.s     |    6 +-
 .../{d10v-elf => sim/d10v}/t-ae-st2w-im.s     |    6 +-
 .../{d10v-elf => sim/d10v}/t-ae-st2w-ip.s     |    6 +-
 .../{d10v-elf => sim/d10v}/t-ae-st2w-is.s     |    6 +-
 sim/testsuite/{d10v-elf => sim/d10v}/t-dbt.s  |    7 +-
 .../{d10v-elf => sim/d10v}/t-ld-st.s          |    4 +
 sim/testsuite/{d10v-elf => sim/d10v}/t-mac.s  |    6 +-
 .../{d10v-elf => sim/d10v}/t-macros.i         |   12 +-
 .../{d10v-elf => sim/d10v}/t-mod-ld-pre.s     |   56 +-
 sim/testsuite/{d10v-elf => sim/d10v}/t-msbu.s |    6 +-
 .../{d10v-elf => sim/d10v}/t-mulxu.s          |    6 +-
 .../{d10v-elf => sim/d10v}/t-mvtac.s          |    6 +-
 sim/testsuite/{d10v-elf => sim/d10v}/t-mvtc.s |    9 +-
 sim/testsuite/{d10v-elf => sim/d10v}/t-rac.s  |    4 +
 .../{d10v-elf => sim/d10v}/t-rachi.s          |    4 +
 sim/testsuite/{d10v-elf => sim/d10v}/t-rdt.s  |    7 +-
 sim/testsuite/{d10v-elf => sim/d10v}/t-rep.s  |    8 +-
 .../{d10v-elf => sim/d10v}/t-rie-xx.s         |    6 +-
 sim/testsuite/{d10v-elf => sim/d10v}/t-rte.s  |    6 +-
 sim/testsuite/{d10v-elf => sim/d10v}/t-sac.s  |    4 +
 .../{d10v-elf => sim/d10v}/t-sachi.s          |    4 +
 sim/testsuite/{d10v-elf => sim/d10v}/t-sadd.s |    6 +-
 sim/testsuite/{d10v-elf => sim/d10v}/t-slae.s |    4 +
 sim/testsuite/{d10v-elf => sim/d10v}/t-sp.s   |    6 +-
 sim/testsuite/{d10v-elf => sim/d10v}/t-sub.s  |    4 +
 .../{d10v-elf => sim/d10v}/t-sub2w.s          |   16 +-
 sim/testsuite/{d10v-elf => sim/d10v}/t-subi.s |    4 +
 sim/testsuite/sim/d10v/t-trap.s               |   10 +
 58 files changed, 299 insertions(+), 3433 deletions(-)
 delete mode 100644 sim/testsuite/d10v-elf/Makefile.in
 delete mode 100755 sim/testsuite/d10v-elf/configure
 delete mode 100644 sim/testsuite/d10v-elf/configure.ac
 delete mode 100644 sim/testsuite/d10v-elf/exit47.s
 delete mode 100644 sim/testsuite/d10v-elf/loop.s
 rename sim/testsuite/{d10v-elf => sim/d10v}/ChangeLog (96%)
 create mode 100644 sim/testsuite/sim/d10v/allinsn.exp
 rename sim/testsuite/{d10v-elf/t-trap.s => sim/d10v/exit47.s} (52%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/hello.s (54%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-ae-ld-d.s (76%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-ae-ld-i.s (79%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-ae-ld-id.s (78%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-ae-ld-im.s (79%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-ae-ld-ip.s (79%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-ae-ld2w-d.s (77%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-ae-ld2w-i.s (80%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-ae-ld2w-id.s (79%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-ae-ld2w-im.s (80%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-ae-ld2w-ip.s (80%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-ae-st-d.s (76%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-ae-st-i.s (79%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-ae-st-id.s (78%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-ae-st-im.s (79%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-ae-st-ip.s (79%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-ae-st-is.s (79%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-ae-st2w-d.s (77%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-ae-st2w-i.s (80%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-ae-st2w-id.s (79%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-ae-st2w-im.s (80%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-ae-st2w-ip.s (80%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-ae-st2w-is.s (79%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-dbt.s (88%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-ld-st.s (88%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-mac.s (95%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-macros.i (97%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-mod-ld-pre.s (90%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-msbu.s (87%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-mulxu.s (87%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-mvtac.s (84%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-mvtc.s (95%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-rac.s (82%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-rachi.s (87%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-rdt.s (75%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-rep.s (90%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-rie-xx.s (79%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-rte.s (78%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-sac.s (85%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-sachi.s (83%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-sadd.s (92%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-slae.s (92%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-sp.s (78%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-sub.s (92%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-sub2w.s (93%)
 rename sim/testsuite/{d10v-elf => sim/d10v}/t-subi.s (92%)
 create mode 100644 sim/testsuite/sim/d10v/t-trap.s

diff --git a/sim/testsuite/ChangeLog b/sim/testsuite/ChangeLog
index 8bc59f03b839..cb9a25a62c6c 100644
--- a/sim/testsuite/ChangeLog
+++ b/sim/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2021-01-05  Mike Frysinger  <vapier@gentoo.org>
+
+	* configure.ac (target): Delete d10v-*-elf case.
+	* configure: Regenerate.
+	* d10v-elf/: Move directory ...
+	* sim/d10v/: ... here.
+
 2021-01-05  Mike Frysinger  <vapier@gentoo.org>
 
 	* configure.ac (target): Delete mips64el-*-elf case.
diff --git a/sim/testsuite/configure b/sim/testsuite/configure
index 764b39acf291..c90da3e6fff4 100755
--- a/sim/testsuite/configure
+++ b/sim/testsuite/configure
@@ -582,11 +582,9 @@ PACKAGE_BUGREPORT=
 PACKAGE_URL=
 
 ac_unique_file="common/bits-tst.c"
-enable_option_checking=no
 ac_subst_vars='LTLIBOBJS
 LIBOBJS
 sim_arch
-subdirs
 target_os
 target_vendor
 target_cpu
@@ -645,7 +643,7 @@ enable_option_checking
       ac_precious_vars='build_alias
 host_alias
 target_alias'
-ac_subdirs_all='d10v-elf'
+
 
 # Initialize some variables set by options.
 ac_init_help=
@@ -1825,16 +1823,6 @@ test -n "$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:
 
@@ -3100,151 +3088,6 @@ if test "$no_create" != yes; then
   # would make configure fail if this is the last instruction.
   $ac_cs_success || as_fn_exit 1
 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
   { $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;}
diff --git a/sim/testsuite/configure.ac b/sim/testsuite/configure.ac
index e878371fd98b..140eb7d5a762 100644
--- a/sim/testsuite/configure.ac
+++ b/sim/testsuite/configure.ac
@@ -11,13 +11,6 @@ AC_SUBST(CC)
 AC_CONFIG_AUX_DIR(../..)
 AC_CANONICAL_SYSTEM
 
-# Configure sub-directory for appropriate targets
-case ${target} in
-    d10v-*-elf )
-	AC_CONFIG_SUBDIRS(d10v-elf)
-	;;
-esac
-
 sinclude(../configure.tgt)
 
 AC_OUTPUT(Makefile)
diff --git a/sim/testsuite/d10v-elf/Makefile.in b/sim/testsuite/d10v-elf/Makefile.in
deleted file mode 100644
index 938085e4ed58..000000000000
--- a/sim/testsuite/d10v-elf/Makefile.in
+++ /dev/null
@@ -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
diff --git a/sim/testsuite/d10v-elf/configure b/sim/testsuite/d10v-elf/configure
deleted file mode 100755
index 5686b7e4eb2c..000000000000
--- a/sim/testsuite/d10v-elf/configure
+++ /dev/null
diff --git a/sim/testsuite/d10v-elf/configure.ac b/sim/testsuite/d10v-elf/configure.ac
deleted file mode 100644
index 278d84d0e825..000000000000
--- a/sim/testsuite/d10v-elf/configure.ac
+++ /dev/null
@@ -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)
diff --git a/sim/testsuite/d10v-elf/exit47.s b/sim/testsuite/d10v-elf/exit47.s
deleted file mode 100644
index 93e466465e2e..000000000000
--- a/sim/testsuite/d10v-elf/exit47.s
+++ /dev/null
@@ -1,4 +0,0 @@
-.include "t-macros.i"
-
-	start
-	exit47
diff --git a/sim/testsuite/d10v-elf/loop.s b/sim/testsuite/d10v-elf/loop.s
deleted file mode 100644
index e1371e4d9511..000000000000
--- a/sim/testsuite/d10v-elf/loop.s
+++ /dev/null
@@ -1,6 +0,0 @@
-	.text
-	.globl _start
-
-_start:
-	bra _start
-	nop
diff --git a/sim/testsuite/d10v-elf/ChangeLog b/sim/testsuite/sim/d10v/ChangeLog
similarity index 96%
rename from sim/testsuite/d10v-elf/ChangeLog
rename to sim/testsuite/sim/d10v/ChangeLog
index fec87674b14b..8915f76d7bd4 100644
--- a/sim/testsuite/d10v-elf/ChangeLog
+++ b/sim/testsuite/sim/d10v/ChangeLog
@@ -1,3 +1,8 @@
+2021-01-05  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>
 
 	* configure: Regnerate.
diff --git a/sim/testsuite/sim/d10v/allinsn.exp b/sim/testsuite/sim/d10v/allinsn.exp
new file mode 100644
index 000000000000..123509a3b990
--- /dev/null
+++ b/sim/testsuite/sim/d10v/allinsn.exp
@@ -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
+    }
+}
diff --git a/sim/testsuite/d10v-elf/t-trap.s b/sim/testsuite/sim/d10v/exit47.s
similarity index 52%
rename from sim/testsuite/d10v-elf/t-trap.s
rename to sim/testsuite/sim/d10v/exit47.s
index 6ac4ae01ef8e..8f2a6ee8003c 100644
--- a/sim/testsuite/d10v-elf/t-trap.s
+++ b/sim/testsuite/sim/d10v/exit47.s
@@ -1,5 +1,8 @@
+# mach: all
+# status: 47
+# output:
+
 .include "t-macros.i"
 
 	start
-
 	exit47
diff --git a/sim/testsuite/d10v-elf/hello.s b/sim/testsuite/sim/d10v/hello.s
similarity index 54%
rename from sim/testsuite/d10v-elf/hello.s
rename to sim/testsuite/sim/d10v/hello.s
index d060c89adb0f..3e3557d7eb82 100644
--- a/sim/testsuite/d10v-elf/hello.s
+++ b/sim/testsuite/sim/d10v/hello.s
@@ -1,3 +1,6 @@
+# mach: all
+# output: Hello World!\n
+
 	.include "t-macros.i"
 
 	start
diff --git a/sim/testsuite/d10v-elf/t-ae-ld-d.s b/sim/testsuite/sim/d10v/t-ae-ld-d.s
similarity index 76%
rename from sim/testsuite/d10v-elf/t-ae-ld-d.s
rename to sim/testsuite/sim/d10v/t-ae-ld-d.s
index 1be783fe9846..511fbb072cf2 100644
--- a/sim/testsuite/d10v-elf/t-ae-ld-d.s
+++ b/sim/testsuite/sim/d10v/t-ae-ld-d.s
@@ -1,3 +1,7 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
@@ -5,7 +9,7 @@
 	PSW_BITS = 0
 	point_dmap_at_imem
 	check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld
-	
+
 	ld r8,@0x4000
 test_ld:
 	ld r8,@0x4001
diff --git a/sim/testsuite/d10v-elf/t-ae-ld-i.s b/sim/testsuite/sim/d10v/t-ae-ld-i.s
similarity index 79%
rename from sim/testsuite/d10v-elf/t-ae-ld-i.s
rename to sim/testsuite/sim/d10v/t-ae-ld-i.s
index 42168e1d812c..b9d10d161404 100644
--- a/sim/testsuite/d10v-elf/t-ae-ld-i.s
+++ b/sim/testsuite/sim/d10v/t-ae-ld-i.s
@@ -1,3 +1,7 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
@@ -5,7 +9,7 @@
 	PSW_BITS = 0
 	point_dmap_at_imem
 	check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld
-	
+
 	ldi r10, #0x4000
 	ld r8, @r10
 
diff --git a/sim/testsuite/d10v-elf/t-ae-ld-id.s b/sim/testsuite/sim/d10v/t-ae-ld-id.s
similarity index 78%
rename from sim/testsuite/d10v-elf/t-ae-ld-id.s
rename to sim/testsuite/sim/d10v/t-ae-ld-id.s
index 86b738235560..ed86525d213d 100644
--- a/sim/testsuite/d10v-elf/t-ae-ld-id.s
+++ b/sim/testsuite/sim/d10v/t-ae-ld-id.s
@@ -1,3 +1,7 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
@@ -5,7 +9,7 @@
 	PSW_BITS = 0
 	point_dmap_at_imem
 	check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld
-	
+
 	ldi r10, #0x4001
 	ld r8, @(1,r10)
 
diff --git a/sim/testsuite/d10v-elf/t-ae-ld-im.s b/sim/testsuite/sim/d10v/t-ae-ld-im.s
similarity index 79%
rename from sim/testsuite/d10v-elf/t-ae-ld-im.s
rename to sim/testsuite/sim/d10v/t-ae-ld-im.s
index 08e2ba6d38e3..42f87161876e 100644
--- a/sim/testsuite/d10v-elf/t-ae-ld-im.s
+++ b/sim/testsuite/sim/d10v/t-ae-ld-im.s
@@ -1,3 +1,7 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
@@ -5,7 +9,7 @@
 	PSW_BITS = 0
 	point_dmap_at_imem
 	check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld
-	
+
 	ldi r10, #0x4000
 	ld r8, @r10-
 
diff --git a/sim/testsuite/d10v-elf/t-ae-ld-ip.s b/sim/testsuite/sim/d10v/t-ae-ld-ip.s
similarity index 79%
rename from sim/testsuite/d10v-elf/t-ae-ld-ip.s
rename to sim/testsuite/sim/d10v/t-ae-ld-ip.s
index cad66600804f..c163912ce5b6 100644
--- a/sim/testsuite/d10v-elf/t-ae-ld-ip.s
+++ b/sim/testsuite/sim/d10v/t-ae-ld-ip.s
@@ -1,3 +1,7 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
@@ -5,7 +9,7 @@
 	PSW_BITS = 0
 	point_dmap_at_imem
 	check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld
-	
+
 	ldi r10, #0x4000
 	ld r8, @r10+
 
diff --git a/sim/testsuite/d10v-elf/t-ae-ld2w-d.s b/sim/testsuite/sim/d10v/t-ae-ld2w-d.s
similarity index 77%
rename from sim/testsuite/d10v-elf/t-ae-ld2w-d.s
rename to sim/testsuite/sim/d10v/t-ae-ld2w-d.s
index c8254ab191f8..1c81594f7ab2 100644
--- a/sim/testsuite/d10v-elf/t-ae-ld2w-d.s
+++ b/sim/testsuite/sim/d10v/t-ae-ld2w-d.s
@@ -1,3 +1,7 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
@@ -5,7 +9,7 @@
 	PSW_BITS = 0
 	point_dmap_at_imem
 	check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld2w
-	
+
 	ld2w r8,@0x4000
 test_ld2w:
 	ld2w r8,@0x4001
diff --git a/sim/testsuite/d10v-elf/t-ae-ld2w-i.s b/sim/testsuite/sim/d10v/t-ae-ld2w-i.s
similarity index 80%
rename from sim/testsuite/d10v-elf/t-ae-ld2w-i.s
rename to sim/testsuite/sim/d10v/t-ae-ld2w-i.s
index 4b32df5cc320..9547870fa43a 100644
--- a/sim/testsuite/d10v-elf/t-ae-ld2w-i.s
+++ b/sim/testsuite/sim/d10v/t-ae-ld2w-i.s
@@ -1,3 +1,7 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
@@ -5,7 +9,7 @@
 	PSW_BITS = 0
 	point_dmap_at_imem
 	check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld2w
-	
+
 	ldi r10, #0x4000
 	ld2w r8, @r10
 
diff --git a/sim/testsuite/d10v-elf/t-ae-ld2w-id.s b/sim/testsuite/sim/d10v/t-ae-ld2w-id.s
similarity index 79%
rename from sim/testsuite/d10v-elf/t-ae-ld2w-id.s
rename to sim/testsuite/sim/d10v/t-ae-ld2w-id.s
index 906b2a0836e5..2766388f1884 100644
--- a/sim/testsuite/d10v-elf/t-ae-ld2w-id.s
+++ b/sim/testsuite/sim/d10v/t-ae-ld2w-id.s
@@ -1,3 +1,7 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
@@ -5,7 +9,7 @@
 	PSW_BITS = 0
 	point_dmap_at_imem
 	check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld2w
-	
+
 	ldi r10, #0x4001
 	ld2w r8,@(1,r10)
 test_ld2w:
diff --git a/sim/testsuite/d10v-elf/t-ae-ld2w-im.s b/sim/testsuite/sim/d10v/t-ae-ld2w-im.s
similarity index 80%
rename from sim/testsuite/d10v-elf/t-ae-ld2w-im.s
rename to sim/testsuite/sim/d10v/t-ae-ld2w-im.s
index 71a7286dfcd0..c6946f3a998f 100644
--- a/sim/testsuite/d10v-elf/t-ae-ld2w-im.s
+++ b/sim/testsuite/sim/d10v/t-ae-ld2w-im.s
@@ -1,3 +1,7 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
@@ -5,7 +9,7 @@
 	PSW_BITS = 0
 	point_dmap_at_imem
 	check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld2w
-	
+
 	ldi r10, #0x4000
 	ld2w r8, @r10-
 
diff --git a/sim/testsuite/d10v-elf/t-ae-ld2w-ip.s b/sim/testsuite/sim/d10v/t-ae-ld2w-ip.s
similarity index 80%
rename from sim/testsuite/d10v-elf/t-ae-ld2w-ip.s
rename to sim/testsuite/sim/d10v/t-ae-ld2w-ip.s
index 38cfab622b14..6214853d7d51 100644
--- a/sim/testsuite/d10v-elf/t-ae-ld2w-ip.s
+++ b/sim/testsuite/sim/d10v/t-ae-ld2w-ip.s
@@ -1,3 +1,7 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
@@ -5,7 +9,7 @@
 	PSW_BITS = 0
 	point_dmap_at_imem
 	check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld2w
-	
+
 	ldi r10, #0x4000
 	ld2w r8, @r10+
 
diff --git a/sim/testsuite/d10v-elf/t-ae-st-d.s b/sim/testsuite/sim/d10v/t-ae-st-d.s
similarity index 76%
rename from sim/testsuite/d10v-elf/t-ae-st-d.s
rename to sim/testsuite/sim/d10v/t-ae-st-d.s
index 1f0edd87f25e..99bd724b5d15 100644
--- a/sim/testsuite/d10v-elf/t-ae-st-d.s
+++ b/sim/testsuite/sim/d10v/t-ae-st-d.s
@@ -1,3 +1,7 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
@@ -5,7 +9,7 @@
 	PSW_BITS = 0
 	point_dmap_at_imem
 	check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st
-	
+
 	st r8,@0x4000
 test_st:
 	st r8,@0x4001
diff --git a/sim/testsuite/d10v-elf/t-ae-st-i.s b/sim/testsuite/sim/d10v/t-ae-st-i.s
similarity index 79%
rename from sim/testsuite/d10v-elf/t-ae-st-i.s
rename to sim/testsuite/sim/d10v/t-ae-st-i.s
index 15245981ecfd..5f0f9b44c419 100644
--- a/sim/testsuite/d10v-elf/t-ae-st-i.s
+++ b/sim/testsuite/sim/d10v/t-ae-st-i.s
@@ -1,3 +1,7 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
@@ -5,7 +9,7 @@
 	PSW_BITS = 0
 	point_dmap_at_imem
 	check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st
-	
+
 	ldi r10,#0x4000
 	st r8, @r10
 
diff --git a/sim/testsuite/d10v-elf/t-ae-st-id.s b/sim/testsuite/sim/d10v/t-ae-st-id.s
similarity index 78%
rename from sim/testsuite/d10v-elf/t-ae-st-id.s
rename to sim/testsuite/sim/d10v/t-ae-st-id.s
index 4caa1b4fafcf..9620fce1a0b8 100644
--- a/sim/testsuite/d10v-elf/t-ae-st-id.s
+++ b/sim/testsuite/sim/d10v/t-ae-st-id.s
@@ -1,3 +1,7 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
@@ -5,7 +9,7 @@
 	PSW_BITS = 0
 	point_dmap_at_imem
 	check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st
-	
+
 	ldi r10,#0x4001
 	st r8, @(1,r10)
 test_st:
diff --git a/sim/testsuite/d10v-elf/t-ae-st-im.s b/sim/testsuite/sim/d10v/t-ae-st-im.s
similarity index 79%
rename from sim/testsuite/d10v-elf/t-ae-st-im.s
rename to sim/testsuite/sim/d10v/t-ae-st-im.s
index d4c8bafe0967..0318243a8d41 100644
--- a/sim/testsuite/d10v-elf/t-ae-st-im.s
+++ b/sim/testsuite/sim/d10v/t-ae-st-im.s
@@ -1,3 +1,7 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
@@ -5,7 +9,7 @@
 	PSW_BITS = 0
 	point_dmap_at_imem
 	check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st
-	
+
 	ldi r10,#0x4000
 	st r8, @r10-
 
diff --git a/sim/testsuite/d10v-elf/t-ae-st-ip.s b/sim/testsuite/sim/d10v/t-ae-st-ip.s
similarity index 79%
rename from sim/testsuite/d10v-elf/t-ae-st-ip.s
rename to sim/testsuite/sim/d10v/t-ae-st-ip.s
index e3a02ee528d3..78d9a1d79940 100644
--- a/sim/testsuite/d10v-elf/t-ae-st-ip.s
+++ b/sim/testsuite/sim/d10v/t-ae-st-ip.s
@@ -1,3 +1,7 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
@@ -5,7 +9,7 @@
 	PSW_BITS = 0
 	point_dmap_at_imem
 	check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st
-	
+
 	ldi r10,#0x4000
 	st r8, @r10+
 
diff --git a/sim/testsuite/d10v-elf/t-ae-st-is.s b/sim/testsuite/sim/d10v/t-ae-st-is.s
similarity index 79%
rename from sim/testsuite/d10v-elf/t-ae-st-is.s
rename to sim/testsuite/sim/d10v/t-ae-st-is.s
index 4868780128c1..08e1d7e5f3da 100644
--- a/sim/testsuite/d10v-elf/t-ae-st-is.s
+++ b/sim/testsuite/sim/d10v/t-ae-st-is.s
@@ -1,3 +1,7 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
@@ -5,7 +9,7 @@
 	PSW_BITS = 0
 	point_dmap_at_imem
 	check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st
-	
+
 	ldi sp,#0x4000
 	st r8, @-SP
 
diff --git a/sim/testsuite/d10v-elf/t-ae-st2w-d.s b/sim/testsuite/sim/d10v/t-ae-st2w-d.s
similarity index 77%
rename from sim/testsuite/d10v-elf/t-ae-st2w-d.s
rename to sim/testsuite/sim/d10v/t-ae-st2w-d.s
index a0d9c3176e9b..6f07a9975819 100644
--- a/sim/testsuite/d10v-elf/t-ae-st2w-d.s
+++ b/sim/testsuite/sim/d10v/t-ae-st2w-d.s
@@ -1,3 +1,7 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
@@ -5,7 +9,7 @@
 	PSW_BITS = 0
 	point_dmap_at_imem
 	check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st2w
-	
+
 	st2w r8,@0x4000
 test_st2w:
 	st2w r8,@0x4001
diff --git a/sim/testsuite/d10v-elf/t-ae-st2w-i.s b/sim/testsuite/sim/d10v/t-ae-st2w-i.s
similarity index 80%
rename from sim/testsuite/d10v-elf/t-ae-st2w-i.s
rename to sim/testsuite/sim/d10v/t-ae-st2w-i.s
index 8c24bc92d75c..a629b759715c 100644
--- a/sim/testsuite/d10v-elf/t-ae-st2w-i.s
+++ b/sim/testsuite/sim/d10v/t-ae-st2w-i.s
@@ -1,3 +1,7 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
@@ -5,7 +9,7 @@
 	PSW_BITS = 0
 	point_dmap_at_imem
 	check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st2w
-	
+
 	ldi r10, #0x4000
 	st2w r8, @r10
 
diff --git a/sim/testsuite/d10v-elf/t-ae-st2w-id.s b/sim/testsuite/sim/d10v/t-ae-st2w-id.s
similarity index 79%
rename from sim/testsuite/d10v-elf/t-ae-st2w-id.s
rename to sim/testsuite/sim/d10v/t-ae-st2w-id.s
index bfbfd4dd69df..91f231978d0a 100644
--- a/sim/testsuite/d10v-elf/t-ae-st2w-id.s
+++ b/sim/testsuite/sim/d10v/t-ae-st2w-id.s
@@ -1,3 +1,7 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
@@ -5,7 +9,7 @@
 	PSW_BITS = 0
 	point_dmap_at_imem
 	check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st2w
-	
+
 	ldi r10, #0x4001
 	st2w r8, @(1,r10)
 test_st2w:
diff --git a/sim/testsuite/d10v-elf/t-ae-st2w-im.s b/sim/testsuite/sim/d10v/t-ae-st2w-im.s
similarity index 80%
rename from sim/testsuite/d10v-elf/t-ae-st2w-im.s
rename to sim/testsuite/sim/d10v/t-ae-st2w-im.s
index ee0a9ebe10a8..f8cc7fb45fbf 100644
--- a/sim/testsuite/d10v-elf/t-ae-st2w-im.s
+++ b/sim/testsuite/sim/d10v/t-ae-st2w-im.s
@@ -1,3 +1,7 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
@@ -5,7 +9,7 @@
 	PSW_BITS = 0
 	point_dmap_at_imem
 	check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st2w
-	
+
 	ldi r10, #0x4000
 	st2w r8, @r10-
 
diff --git a/sim/testsuite/d10v-elf/t-ae-st2w-ip.s b/sim/testsuite/sim/d10v/t-ae-st2w-ip.s
similarity index 80%
rename from sim/testsuite/d10v-elf/t-ae-st2w-ip.s
rename to sim/testsuite/sim/d10v/t-ae-st2w-ip.s
index dc911f723fbb..63c5abd5bd08 100644
--- a/sim/testsuite/d10v-elf/t-ae-st2w-ip.s
+++ b/sim/testsuite/sim/d10v/t-ae-st2w-ip.s
@@ -1,3 +1,7 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
@@ -5,7 +9,7 @@
 	PSW_BITS = 0
 	point_dmap_at_imem
 	check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st2w
-	
+
 	ldi r10, #0x4000
 	st2w r8, @r10+
 
diff --git a/sim/testsuite/d10v-elf/t-ae-st2w-is.s b/sim/testsuite/sim/d10v/t-ae-st2w-is.s
similarity index 79%
rename from sim/testsuite/d10v-elf/t-ae-st2w-is.s
rename to sim/testsuite/sim/d10v/t-ae-st2w-is.s
index e39d71ce4c08..190ab4223a02 100644
--- a/sim/testsuite/d10v-elf/t-ae-st2w-is.s
+++ b/sim/testsuite/sim/d10v/t-ae-st2w-is.s
@@ -1,3 +1,7 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
@@ -5,7 +9,7 @@
 	PSW_BITS = 0
 	point_dmap_at_imem
 	check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st2w
-	
+
 	ldi sp, #0x4004
 	st2w r8, @-SP
 
diff --git a/sim/testsuite/d10v-elf/t-dbt.s b/sim/testsuite/sim/d10v/t-dbt.s
similarity index 88%
rename from sim/testsuite/d10v-elf/t-dbt.s
rename to sim/testsuite/sim/d10v/t-dbt.s
index 8c518475be7c..9b405b09c833 100644
--- a/sim/testsuite/d10v-elf/t-dbt.s
+++ b/sim/testsuite/sim/d10v/t-dbt.s
@@ -1,9 +1,14 @@
+# mach: all
+# output:
+# sim: --environment operating
+# as: -W
+
 .include "t-macros.i"
 
 	start
 
 	PSW_BITS = PSW_DM
-	
+
 ;;; Blat our DMAP registers so that they point at on-chip imem
 
 	ldi r2, MAP_INSN | 0xf
diff --git a/sim/testsuite/d10v-elf/t-ld-st.s b/sim/testsuite/sim/d10v/t-ld-st.s
similarity index 88%
rename from sim/testsuite/d10v-elf/t-ld-st.s
rename to sim/testsuite/sim/d10v/t-ld-st.s
index ec9f2023f6ae..4ae4f852e56a 100644
--- a/sim/testsuite/d10v-elf/t-ld-st.s
+++ b/sim/testsuite/sim/d10v/t-ld-st.s
@@ -1,3 +1,7 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
diff --git a/sim/testsuite/d10v-elf/t-mac.s b/sim/testsuite/sim/d10v/t-mac.s
similarity index 95%
rename from sim/testsuite/d10v-elf/t-mac.s
rename to sim/testsuite/sim/d10v/t-mac.s
index 364f61531d14..1b6e660c5364 100644
--- a/sim/testsuite/d10v-elf/t-mac.s
+++ b/sim/testsuite/sim/d10v/t-mac.s
@@ -1,3 +1,7 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
@@ -22,7 +26,7 @@ test_macu2:
 
 
 
-	
+
 	;; clear FX
 	ldi r2, #0x8005
 	mvtc r2, cr0
diff --git a/sim/testsuite/d10v-elf/t-macros.i b/sim/testsuite/sim/d10v/t-macros.i
similarity index 97%
rename from sim/testsuite/d10v-elf/t-macros.i
rename to sim/testsuite/sim/d10v/t-macros.i
index f424acfa57b7..d6e155ce232f 100644
--- a/sim/testsuite/d10v-elf/t-macros.i
+++ b/sim/testsuite/sim/d10v/t-macros.i
@@ -1,3 +1,7 @@
+# mach: d10v
+# output:
+# sim: --environment operating
+
 	.macro start
 	.text
 	.align 2
@@ -158,12 +162,12 @@ _start:
 	.text
 	ldi r4, #1f
 	ldi r5, \vec
-	;; 	
+	;;
 	ld2w r2, @(0,r4)
 	st2w r2, @(0,r5)
 	ld2w r2, @(4,r4)
 	st2w r2, @(4,r5)
-	;; 	
+	;;
 	bra 9f
 	nop
 ;;; Code that gets patched into the interrupt vector
@@ -185,7 +189,7 @@ _start:
 	exit2
 4:	exit0
 ;;; continue as normal
-9:	
+9:
 	.endm
 
 
@@ -229,5 +233,3 @@ _start:
 	VEC_SDBT = 0x3fff4
 	VEC_DBI  = 0x3ff58
 	VEC_EI   = 0x3ff5c
-
-
diff --git a/sim/testsuite/d10v-elf/t-mod-ld-pre.s b/sim/testsuite/sim/d10v/t-mod-ld-pre.s
similarity index 90%
rename from sim/testsuite/d10v-elf/t-mod-ld-pre.s
rename to sim/testsuite/sim/d10v/t-mod-ld-pre.s
index 4536e0344e1a..7d75af2b877c 100644
--- a/sim/testsuite/d10v-elf/t-mod-ld-pre.s
+++ b/sim/testsuite/sim/d10v/t-mod-ld-pre.s
@@ -1,15 +1,15 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
-.section        .rodata
- 
-        .text
-        .globl  main
-        .type   main,@function
-main:
+    start
+
     mvfc        r0, PSW             ||  ldi.s       r14, #0
     ldi.l       r2, 0x100               ; MOD_E
     ldi.l       r3, 0x108               ; MOD_S
- 
+
 test_mod_dec_ld:
     mvtc        r2, MOD_E           ||  bseti       r0, #7
     mvtc        r3, MOD_S
@@ -19,12 +19,12 @@ test_mod_dec_ld:
     ld          r4, @r1-        ||      nop     ; r1=0x104
     ld          r4, @r1-        ||      nop     ; r1=0x102
     ld          r4, @r1-        ||      nop     ; r1=0x100
-    ld          r4, @r1-        ||      nop     ; r1=0x108 
-    ld          r4, @r1-        ||      nop     ; r1=0x106 
- 
+    ld          r4, @r1-        ||      nop     ; r1=0x108
+    ld          r4, @r1-        ||      nop     ; r1=0x106
+
     cmpeqi      r1,#0x106
     brf0f       _ERR            ;  branch to error
- 
+
 test_mod_inc_ld:
     mvtc        r2, MOD_S
     mvtc        r3, MOD_E
@@ -35,22 +35,22 @@ test_mod_inc_ld:
     ld          r4, @r1+        ||      nop     ; r1=0x108
     ld          r4, @r1+        ||      nop     ; r1=0x100
     ld          r4, @r1+        ||      nop     ; r1=0x102
- 
+
     cmpeqi      r1,#0x102
     brf0f       _ERR
- 
+
 test_mod_dec_ld2w:
     mvtc        r2, MOD_E
     mvtc        r3, MOD_S
     mv          r1,r3                           ; r1=0x108
     ld2W        r4, @r1-        ||      nop     ; r1=0x104
     ld2W        r4, @r1-        ||      nop     ; r1=0x100
-    ld2W        r4, @r1-        ||      nop     ; r1=0x108 
-    ld2W        r4, @r1-        ||      nop     ; r1=0x104 
- 
+    ld2W        r4, @r1-        ||      nop     ; r1=0x108
+    ld2W        r4, @r1-        ||      nop     ; r1=0x104
+
     cmpeqi      r1,#0x104
     brf0f       _ERR            ; <= branch to error
- 
+
 test_mod_inc_ld2w:
     mvtc        r2, MOD_S
     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=0x100
     ld2W        r4, @r1+        ||      nop     ; r1=0x104
- 
+
     cmpeqi      r1,#0x104
     brf0f       _ERR
- 
+
 test_mod_dec_ld_dis:
     mvtc        r0, PSW                 ; modulo mode disable
     mvtc        r2, MOD_E
@@ -74,10 +74,10 @@ test_mod_dec_ld_dis:
     ld          r4, @r1-        ||      nop     ; r1=0x100
     ld          r4, @r1-        ||      nop     ; r1=0xFE
     ld          r4, @r1-        ||      nop     ; r1=0xFC
- 
+
     cmpeqi      r1,#0xFC
     brf0f       _ERR
- 
+
 test_mod_inc_ld_dis:
     mvtc        r2, MOD_S
     mvtc        r3, MOD_E
@@ -88,10 +88,10 @@ test_mod_inc_ld_dis:
     ld          r4, @r1+        ||      nop     ; r1=0x108
     ld          r4, @r1+        ||      nop     ; r1=0x10A
     ld          r4, @r1+        ||      nop     ; r1=0x10C
- 
+
     cmpeqi      r1,#0x10C
     brf0f       _ERR
- 
+
 test_mod_dec_ld2w_dis:
     mvtc        r2, MOD_E
     mvtc        r3, MOD_S
@@ -100,7 +100,7 @@ test_mod_dec_ld2w_dis:
     ld2W        r4, @r1-        ||      nop     ; r1=0x100
     ld2W        r4, @r1-        ||      nop     ; r1=0xFC
     ld2W        r4, @r1-        ||      nop     ; r1=0xF8
- 
+
     cmpeqi      r1,#0xF8
     brf0f       _ERR
 
@@ -112,15 +112,15 @@ test_mod_dec_ld2w_dis:
     ld2W        r4, @r1+        ||      nop     ; r1=0x108
     ld2W        r4, @r1+        ||      nop     ; r1=0x10C
     ld2W        r4, @r1+        ||      nop     ; r1=0x110
- 
+
     cmpeqi      r1,#0x110
-    brf0f       _ERR 
+    brf0f       _ERR
 
 _OK:
 	exit0
- 
+
 _ERR:
 	exit47
 
- 
+
 
diff --git a/sim/testsuite/d10v-elf/t-msbu.s b/sim/testsuite/sim/d10v/t-msbu.s
similarity index 87%
rename from sim/testsuite/d10v-elf/t-msbu.s
rename to sim/testsuite/sim/d10v/t-msbu.s
index 04276cc25d95..93b65a539798 100644
--- a/sim/testsuite/d10v-elf/t-msbu.s
+++ b/sim/testsuite/sim/d10v/t-msbu.s
@@ -1,3 +1,7 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
@@ -13,7 +17,7 @@ test_msbu1:
 	MSBU a1, r9, r8
 	checkacc2 1 a1 0X7F 0x7FFF 0x8000
 
-	
+
 	;; set FX
 	ldi r2, #0x8085
 	mvtc r2, cr0
diff --git a/sim/testsuite/d10v-elf/t-mulxu.s b/sim/testsuite/sim/d10v/t-mulxu.s
similarity index 87%
rename from sim/testsuite/d10v-elf/t-mulxu.s
rename to sim/testsuite/sim/d10v/t-mulxu.s
index a8e6ffc8d49b..b0c14b6d6da2 100644
--- a/sim/testsuite/d10v-elf/t-mulxu.s
+++ b/sim/testsuite/sim/d10v/t-mulxu.s
@@ -1,3 +1,7 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
@@ -13,7 +17,7 @@ test_mulxu1:
 	MULXU a1, r9, r8
 	checkacc2 1 a1 0x00 0x8000 0x7FFF
 
-	
+
 	;; set FX
 	ldi r2, #0x8085
 	mvtc r2, cr0
diff --git a/sim/testsuite/d10v-elf/t-mvtac.s b/sim/testsuite/sim/d10v/t-mvtac.s
similarity index 84%
rename from sim/testsuite/d10v-elf/t-mvtac.s
rename to sim/testsuite/sim/d10v/t-mvtac.s
index 68452dc827a2..dc73403192d5 100644
--- a/sim/testsuite/d10v-elf/t-mvtac.s
+++ b/sim/testsuite/sim/d10v/t-mvtac.s
@@ -1,3 +1,7 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
@@ -8,7 +12,7 @@
 
 	mvtacg	r0, a0
 	checkacc2 2 a0 0x00 0xffff 0xbeef
-	
+
 	ldi r8, 0xdead
 	mvtachi	r8, a0
 	checkacc2 3 a0 0xff 0xdead 0xbeef
diff --git a/sim/testsuite/d10v-elf/t-mvtc.s b/sim/testsuite/sim/d10v/t-mvtc.s
similarity index 95%
rename from sim/testsuite/d10v-elf/t-mvtc.s
rename to sim/testsuite/sim/d10v/t-mvtc.s
index 2eed8331a405..0b463ae935f0 100644
--- a/sim/testsuite/d10v-elf/t-mvtc.s
+++ b/sim/testsuite/sim/d10v/t-mvtc.s
@@ -1,3 +1,8 @@
+# mach: all
+# output:
+# sim: --environment operating
+# as: -W
+
 .include "t-macros.i"
 
 	start
@@ -32,7 +37,7 @@
 	checkpsw2 9 PSW_FX|PSW_ST
 
 	;; loadpsw2 PSW_ST
-	;; checkpsw2 10 
+	;; checkpsw2 10
 
 	loadpsw2 PSW_10
 	checkpsw2 11 0 ;; PSW_10
@@ -59,7 +64,7 @@
 	mvtc	r6, cr10
 	ldi	r6, #0xbeef
 	mvtc	r6, cr11
-	
+
 	mvfc	r7, cr10
 	check 17 r7 0xdeac
 	mvfc	r7, cr11
diff --git a/sim/testsuite/d10v-elf/t-rac.s b/sim/testsuite/sim/d10v/t-rac.s
similarity index 82%
rename from sim/testsuite/d10v-elf/t-rac.s
rename to sim/testsuite/sim/d10v/t-rac.s
index f2123116c642..a452299d581c 100644
--- a/sim/testsuite/d10v-elf/t-rac.s
+++ b/sim/testsuite/sim/d10v/t-rac.s
@@ -1,3 +1,7 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
diff --git a/sim/testsuite/d10v-elf/t-rachi.s b/sim/testsuite/sim/d10v/t-rachi.s
similarity index 87%
rename from sim/testsuite/d10v-elf/t-rachi.s
rename to sim/testsuite/sim/d10v/t-rachi.s
index ed901959469d..57589b5d96a4 100644
--- a/sim/testsuite/d10v-elf/t-rachi.s
+++ b/sim/testsuite/sim/d10v/t-rachi.s
@@ -1,3 +1,7 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
diff --git a/sim/testsuite/d10v-elf/t-rdt.s b/sim/testsuite/sim/d10v/t-rdt.s
similarity index 75%
rename from sim/testsuite/d10v-elf/t-rdt.s
rename to sim/testsuite/sim/d10v/t-rdt.s
index 661b583bb130..947da8644d56 100644
--- a/sim/testsuite/d10v-elf/t-rdt.s
+++ b/sim/testsuite/sim/d10v/t-rdt.s
@@ -1,9 +1,14 @@
+# mach: all
+# output:
+# sim: --environment operating
+# as: -W
+
 .include "t-macros.i"
 
 	start
 
 	PSW_BITS = PSW_C|PSW_F0|PSW_F1
-	
+
 	ldi	r6, #success@word
 	mvtc	r6, dpc
 	ldi	r6, #PSW_BITS
diff --git a/sim/testsuite/d10v-elf/t-rep.s b/sim/testsuite/sim/d10v/t-rep.s
similarity index 90%
rename from sim/testsuite/d10v-elf/t-rep.s
rename to sim/testsuite/sim/d10v/t-rep.s
index cea3ea8251d8..433aff1e4ef5 100644
--- a/sim/testsuite/d10v-elf/t-rep.s
+++ b/sim/testsuite/sim/d10v/t-rep.s
@@ -1,12 +1,16 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
 
 
-	
+
 	;; Check that the instruction @REP_E is executed when it
 	;; is reached using a branch instruction
-	
+
 	ldi r2, 1
 test_rep_1:
 	rep	r2, end_rep_1
diff --git a/sim/testsuite/d10v-elf/t-rie-xx.s b/sim/testsuite/sim/d10v/t-rie-xx.s
similarity index 79%
rename from sim/testsuite/d10v-elf/t-rie-xx.s
rename to sim/testsuite/sim/d10v/t-rie-xx.s
index 2a6fcbdd6fc8..fa6b4fc383ac 100644
--- a/sim/testsuite/d10v-elf/t-rie-xx.s
+++ b/sim/testsuite/sim/d10v/t-rie-xx.s
@@ -1,3 +1,7 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
@@ -5,7 +9,7 @@
 	PSW_BITS = 0
 	point_dmap_at_imem
 	check_interrupt (VEC_RIE&DMAP_MASK)+DMAP_BASE PSW_BITS test_rie_xx
-	
+
 test_rie_xx:
         .short 0xe120, 0x0000  ;; Example of RIE code
 	nop
diff --git a/sim/testsuite/d10v-elf/t-rte.s b/sim/testsuite/sim/d10v/t-rte.s
similarity index 78%
rename from sim/testsuite/d10v-elf/t-rte.s
rename to sim/testsuite/sim/d10v/t-rte.s
index 5ce31ddbf41a..392f11812f17 100644
--- a/sim/testsuite/d10v-elf/t-rte.s
+++ b/sim/testsuite/sim/d10v/t-rte.s
@@ -1,9 +1,13 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
 
 	PSW_BITS = PSW_C|PSW_F0|PSW_F1
-	
+
 	ldi	r6, #success@word
 	mvtc	r6, bpc
 	ldi	r6, #PSW_BITS
diff --git a/sim/testsuite/d10v-elf/t-sac.s b/sim/testsuite/sim/d10v/t-sac.s
similarity index 85%
rename from sim/testsuite/d10v-elf/t-sac.s
rename to sim/testsuite/sim/d10v/t-sac.s
index 7042be025b1d..84c31d74c3b4 100644
--- a/sim/testsuite/d10v-elf/t-sac.s
+++ b/sim/testsuite/sim/d10v/t-sac.s
@@ -1,3 +1,7 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
diff --git a/sim/testsuite/d10v-elf/t-sachi.s b/sim/testsuite/sim/d10v/t-sachi.s
similarity index 83%
rename from sim/testsuite/d10v-elf/t-sachi.s
rename to sim/testsuite/sim/d10v/t-sachi.s
index 7774ee045588..b9ed0e71a014 100644
--- a/sim/testsuite/d10v-elf/t-sachi.s
+++ b/sim/testsuite/sim/d10v/t-sachi.s
@@ -1,3 +1,7 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
diff --git a/sim/testsuite/d10v-elf/t-sadd.s b/sim/testsuite/sim/d10v/t-sadd.s
similarity index 92%
rename from sim/testsuite/d10v-elf/t-sadd.s
rename to sim/testsuite/sim/d10v/t-sadd.s
index f3e4ebe3da4a..fb463d917377 100644
--- a/sim/testsuite/d10v-elf/t-sadd.s
+++ b/sim/testsuite/sim/d10v/t-sadd.s
@@ -1,3 +1,7 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
@@ -13,7 +17,7 @@
         checkacc2 1 a0 0x00 0x7fff 0xffff
         checkacc2 2 a1 0xff 0x8000 0x7fff
 
- ;; Test overflow 
+ ;; Test overflow
 
         loadacc2 a0 0x00 0x0000 0x0000
         loadacc2 a1 0x01 0x8000 0x0000
diff --git a/sim/testsuite/d10v-elf/t-slae.s b/sim/testsuite/sim/d10v/t-slae.s
similarity index 92%
rename from sim/testsuite/d10v-elf/t-slae.s
rename to sim/testsuite/sim/d10v/t-slae.s
index 6d8422d0f9f8..8236fa2fd774 100644
--- a/sim/testsuite/d10v-elf/t-slae.s
+++ b/sim/testsuite/sim/d10v/t-slae.s
@@ -1,3 +1,7 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
diff --git a/sim/testsuite/d10v-elf/t-sp.s b/sim/testsuite/sim/d10v/t-sp.s
similarity index 78%
rename from sim/testsuite/d10v-elf/t-sp.s
rename to sim/testsuite/sim/d10v/t-sp.s
index 84f9ad486766..df443b904879 100644
--- a/sim/testsuite/d10v-elf/t-sp.s
+++ b/sim/testsuite/sim/d10v/t-sp.s
@@ -1,3 +1,7 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
@@ -8,7 +12,7 @@
 	ldi sp, 0xdead
 	loadpsw2 PSW_SM
 	ldi sp, 0xbeef
-	
+
 	loadpsw2 0
 	check 1 sp 0xdead
 	loadpsw2 PSW_SM
diff --git a/sim/testsuite/d10v-elf/t-sub.s b/sim/testsuite/sim/d10v/t-sub.s
similarity index 92%
rename from sim/testsuite/d10v-elf/t-sub.s
rename to sim/testsuite/sim/d10v/t-sub.s
index 26d0a3a1c9ab..57b99e68efe3 100644
--- a/sim/testsuite/d10v-elf/t-sub.s
+++ b/sim/testsuite/sim/d10v/t-sub.s
@@ -1,3 +1,7 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
diff --git a/sim/testsuite/d10v-elf/t-sub2w.s b/sim/testsuite/sim/d10v/t-sub2w.s
similarity index 93%
rename from sim/testsuite/d10v-elf/t-sub2w.s
rename to sim/testsuite/sim/d10v/t-sub2w.s
index 9f1bbb7321e8..5e8daee35186 100644
--- a/sim/testsuite/d10v-elf/t-sub2w.s
+++ b/sim/testsuite/sim/d10v/t-sub2w.s
@@ -1,3 +1,7 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
@@ -5,11 +9,11 @@
 ;;  The d10v implements negated addition for subtraction
 
 	.macro check_sub2w s x y r c v
-	
+
 	;; clear carry
 	ldi	r6,#0x8004
 	mvtc	r6,cr0
-	
+
 	;; load opnds
 	ld2w	r6, @(1f,r0)
 	ld2w	r8, @(2f,r0)
@@ -17,10 +21,10 @@
 1:	.long	\x
 2:	.long	\y
 	.text
-	
+
 	;; subtract
 	SUB2W	r6, r8
-	
+
 	;; verify result
 	ld2w	r10, @(1f,r0)
 	.data
@@ -34,7 +38,7 @@
 	ldi	r0, \s
 	trap	15
 3:
-	
+
 	;; verify carry
 	mvfc	r6, cr0
 	and3	r6, r6, #1
@@ -45,7 +49,7 @@
 	trap	15
 1:
 	.endm
-	
+
 check_sub2w 1 0x00000000 0x00000000  0x00000000 1 0
 check_sub2w 2 0x00000000 0x00000001  0xffffffff 0 0
 check_sub2w 3 0x00000001 0x00000000  0x00000001 1 0
diff --git a/sim/testsuite/d10v-elf/t-subi.s b/sim/testsuite/sim/d10v/t-subi.s
similarity index 92%
rename from sim/testsuite/d10v-elf/t-subi.s
rename to sim/testsuite/sim/d10v/t-subi.s
index 81faad5ec24a..dd4b2be61a56 100644
--- a/sim/testsuite/d10v-elf/t-subi.s
+++ b/sim/testsuite/sim/d10v/t-subi.s
@@ -1,3 +1,7 @@
+# mach: all
+# output:
+# sim: --environment operating
+
 .include "t-macros.i"
 
 	start
diff --git a/sim/testsuite/sim/d10v/t-trap.s b/sim/testsuite/sim/d10v/t-trap.s
new file mode 100644
index 000000000000..7e5336cbdf64
--- /dev/null
+++ b/sim/testsuite/sim/d10v/t-trap.s
@@ -0,0 +1,10 @@
+# mach: all
+# status: 47
+# output:
+# sim: --environment operating
+
+.include "t-macros.i"
+
+	start
+
+	exit47
-- 
2.28.0


  parent reply	other threads:[~2021-01-05  8:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-05  6:55 [PATCH 1/2] sim: testsuite: allow tests to declare expected exit status Mike Frysinger
2021-01-05  6:55 ` [PATCH 2/2] sim: m32r: clean up redundant test coverage Mike Frysinger
2021-01-05  7:30 ` [PATCH] sim: frv: " Mike Frysinger
2021-01-05  7:34 ` [PATCH] sim: mips: delete empty stub test dir Mike Frysinger
2021-01-05  8:17 ` Mike Frysinger [this message]
2021-01-06  0:31 ` [PATCH] sim: testsuite: delete configure script Mike Frysinger
2021-01-11 23:34 ` [PATCH 1/2] sim: testsuite: allow tests to declare expected exit status Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210105081705.1422-1-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).