]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
sim: move default model to the runtime sim state
authorMike Frysinger <vapier@gentoo.org>
Tue, 29 Jun 2021 02:07:44 +0000 (22:07 -0400)
committerMike Frysinger <vapier@gentoo.org>
Wed, 30 Jun 2021 06:57:45 +0000 (02:57 -0400)
This kills off another compile-time option by moving the setting to
the individual arch runtimes.  This will allow dynamic selection by
the arch when doing a single build with multiple arches.

The sim_model_init rework is a little funky.  In the past it was
disabled entirely if no default model was set.  We maintain the
spirit of the logic by gating the fallback logic on whether the
port has defined any models.

62 files changed:
sim/ChangeLog
sim/Makefile.in
sim/bfin/ChangeLog
sim/bfin/aclocal.m4
sim/bfin/configure
sim/bfin/configure.ac
sim/bfin/interp.c
sim/bpf/ChangeLog
sim/bpf/aclocal.m4
sim/bpf/configure
sim/bpf/configure.ac
sim/bpf/sim-if.c
sim/common/ChangeLog
sim/common/Make-common.in
sim/common/sim-base.h
sim/common/sim-model.c
sim/common/sim-model.h
sim/configure
sim/configure.ac
sim/cris/ChangeLog
sim/cris/aclocal.m4
sim/cris/configure
sim/cris/configure.ac
sim/cris/sim-if.c
sim/frv/ChangeLog
sim/frv/aclocal.m4
sim/frv/configure
sim/frv/configure.ac
sim/frv/sim-if.c
sim/iq2000/ChangeLog
sim/iq2000/aclocal.m4
sim/iq2000/configure
sim/iq2000/configure.ac
sim/iq2000/sim-if.c
sim/lm32/ChangeLog
sim/lm32/aclocal.m4
sim/lm32/configure
sim/lm32/configure.ac
sim/lm32/sim-if.c
sim/m32r/ChangeLog
sim/m32r/aclocal.m4
sim/m32r/configure
sim/m32r/configure.ac
sim/m32r/sim-if.c
sim/m4/sim_ac_option_default_model.m4 [deleted file]
sim/m4/sim_ac_output.m4
sim/mips/ChangeLog
sim/mips/configure
sim/mn10300/ChangeLog
sim/mn10300/configure
sim/or1k/ChangeLog
sim/or1k/aclocal.m4
sim/or1k/configure
sim/or1k/configure.ac
sim/or1k/sim-if.c
sim/riscv/ChangeLog
sim/riscv/aclocal.m4
sim/riscv/configure
sim/riscv/configure.ac
sim/riscv/interp.c
sim/v850/ChangeLog
sim/v850/configure

index 59c123de79cab4e3ebb6d4a7c85c817285ab57b3..91edb5e5d09c70a68f5e47b39b1aa8e89c38dee0 100644 (file)
@@ -1,3 +1,10 @@
+2021-06-30  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure.ac (sim_default_model): Delete.
+       * m4/sim_ac_output.m4 (sim_default_model): Likewise.
+       * configure, Makefile.in: Regenerate.
+       * m4/sim_ac_option_default_model.m4: Removed.
+
 2021-06-29  Mike Frysinger  <vapier@gentoo.org>
 
        * m4/sim_ac_option_warnings.m4: Add -Wunused-but-set-parameter.
index 047d548bb7bb3b11b577a686ed1a89078b74a567..1d9e855696754cc962e1be4d497f859b48386985 100644 (file)
@@ -781,7 +781,6 @@ psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 sim_bitsize = @sim_bitsize@
-sim_default_model = @sim_default_model@
 sim_float = @sim_float@
 sim_hw_cflags = @sim_hw_cflags@
 sim_hw_sockser = @sim_hw_sockser@
index 6b0000ac7cf116574bb3d742d1f1756de6edc646..c1397bd943057e43df9551c793ef722b0d821f8a 100644 (file)
@@ -1,3 +1,10 @@
+2021-06-30  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure.ac: Delete SIM_AC_OPTION_DEFAULT_MODEL call.
+       * interp.c (sim_open): Set STATE_MODEL_NAME.
+       * aclocal.m4: Regenerate.
+       * configure: Regenerate.
+
 2021-06-30  Mike Frysinger  <vapier@gentoo.org>
 
        * interp.c (sim_open): Set STATE_MACHS.
index bdbe880552f7e200bf1595b7f4c9a6ba03d78981..c9414d4680f1db90e5d5f6f1d4e8f0ee2eeb0f35 100644 (file)
@@ -12,5 +12,4 @@
 # PARTICULAR PURPOSE.
 
 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
-m4_include([../m4/sim_ac_option_default_model.m4])
 m4_include([../m4/sim_ac_output.m4])
index bed0a3d277c1fdc2aa3954a91cd28b7ba15b9da2..9b8c7fc26ec00be4ecd6126d7d513ba188e6ccd4 100755 (executable)
@@ -628,12 +628,10 @@ PACKAGE_VERSION
 PACKAGE_TARNAME
 PACKAGE_NAME
 PATH_SEPARATOR
-SHELL
-sim_default_model'
+SHELL'
 ac_subst_files=''
 ac_user_opts='
 enable_option_checking
-enable_sim_default_model
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1241,13 +1239,6 @@ if test -n "$ac_init_help"; then
 
   cat <<\_ACEOF
 
-Optional Features:
-  --disable-option-checking  ignore unrecognized --enable/--with options
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --enable-sim-default-model=model
-                          Specify default model to simulate
-
 Report bugs to the package provider.
 _ACEOF
 ac_status=$?
@@ -1678,23 +1669,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
-
-default_sim_default_model="bf537"
-# Check whether --enable-sim-default-model was given.
-if test "${enable_sim_default_model+set}" = set; then :
-  enableval=$enable_sim_default_model; case "${enableval}" in
-  yes|no) as_fn_error $? "\"Missing argument to --enable-sim-default-model\"" "$LINENO" 5;;
-  *)   sim_default_model="-DWITH_DEFAULT_MODEL='\"${enableval}\"'";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_default_model" != x""; then
-  echo "Setting default model = $sim_default_model" 6>&1
-fi
-else
-  sim_default_model="-DWITH_DEFAULT_MODEL='\"${default_sim_default_model}\"'"
-fi
-
-
-
 cgen_breaks=""
 if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
 cgen_breaks="break cgen_rtx_error";
@@ -1716,7 +1690,6 @@ ac_config_commands="$ac_config_commands stamp-h"
 
 
 
-
 SIM_COMMON_BUILD_TRUE='#'
 SIM_COMMON_BUILD_FALSE=
 
index 6cf5c487958485bf43be3c5eb1d89edafe2ef6fb..99370b3a5770e6ce8dc83f6ca797c74d008978a7 100644 (file)
@@ -2,6 +2,4 @@ dnl Process this file with autoconf to produce a configure script.
 AC_INIT(Makefile.in)
 AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
 
-SIM_AC_OPTION_DEFAULT_MODEL(bf537)
-
 SIM_AC_OUTPUT
index dcc7a132d765bcb6304ec939a3d03e2123d08e4a..b99f20d916966be92bccc0b88c4964f5c66e3a38 100644 (file)
@@ -704,6 +704,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback,
 
   /* Set default options before parsing user options.  */
   STATE_MACHS (sd) = bfin_sim_machs;
+  STATE_MODEL_NAME (sd) = "bf537";
   current_alignment = STRICT_ALIGNMENT;
   current_target_byte_order = BFD_ENDIAN_LITTLE;
 
index 959c63f97a969dce26770df64d6f23e952268188..63037fd56b981d913d98ff689f4ab73f5dcdbe8d 100644 (file)
@@ -1,3 +1,10 @@
+2021-06-30  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure.ac: Delete SIM_AC_OPTION_DEFAULT_MODEL call.
+       * sim-if.c (sim_open): Set STATE_MODEL_NAME.
+       * aclocal.m4: Regenerate.
+       * configure: Regenerate.
+
 2021-06-30  Mike Frysinger  <vapier@gentoo.org>
 
        * arch.c (sim_machs): Rename to ...
index d0f761fd802854f52067822d764a2a04cbcabe7f..90a839c26137e3e4eaeba9819a834015ff15140f 100644 (file)
@@ -13,6 +13,5 @@
 
 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
 m4_include([../m4/sim_ac_option_bitsize.m4])
-m4_include([../m4/sim_ac_option_default_model.m4])
 m4_include([../m4/sim_ac_option_scache.m4])
 m4_include([../m4/sim_ac_output.m4])
index 2dc2ee2564c7e4842f425bb2f34eff65619ffd99..de2798ce6f46e596cc5ac7be9b34a44f7512d167 100755 (executable)
@@ -628,14 +628,12 @@ PACKAGE_NAME
 PATH_SEPARATOR
 SHELL
 sim_scache
-sim_default_model
 sim_bitsize'
 ac_subst_files=''
 ac_user_opts='
 enable_option_checking
 enable_sim_bitsize
 enable_sim_scache
-enable_sim_default_model
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1250,8 +1248,6 @@ Optional Features:
   --enable-sim-bitsize=N  Specify target bitsize (32 or 64)
   --enable-sim-scache=size
                           Specify simulator execution cache size
-  --enable-sim-default-model=model
-                          Specify default model to simulate
 
 Report bugs to the package provider.
 _ACEOF
@@ -1762,22 +1758,6 @@ fi
 
 
 
-default_sim_default_model="bpf-def"
-# Check whether --enable-sim-default-model was given.
-if test "${enable_sim_default_model+set}" = set; then :
-  enableval=$enable_sim_default_model; case "${enableval}" in
-  yes|no) as_fn_error $? "\"Missing argument to --enable-sim-default-model\"" "$LINENO" 5;;
-  *)   sim_default_model="-DWITH_DEFAULT_MODEL='\"${enableval}\"'";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_default_model" != x""; then
-  echo "Setting default model = $sim_default_model" 6>&1
-fi
-else
-  sim_default_model="-DWITH_DEFAULT_MODEL='\"${default_sim_default_model}\"'"
-fi
-
-
-
 cgen_breaks=""
 if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
 cgen_breaks="break cgen_rtx_error";
@@ -1799,7 +1779,6 @@ ac_config_commands="$ac_config_commands stamp-h"
 
 
 
-
 SIM_COMMON_BUILD_TRUE='#'
 SIM_COMMON_BUILD_FALSE=
 
index 32729370b5aaa692b7678172291c85713b6d7923..9cbd202d590dc487936fa23c39239c0c9562cf88 100644 (file)
@@ -4,6 +4,5 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
 
 SIM_AC_OPTION_BITSIZE([64])
 SIM_AC_OPTION_SCACHE(16384)
-SIM_AC_OPTION_DEFAULT_MODEL([bpf-def])
 
 SIM_AC_OUTPUT
index 150f5cd67861083d914cbccbbe9876171842e0a4..aba191df7ec49992566da07f70fc5339cb0f3100 100644 (file)
@@ -129,6 +129,7 @@ sim_open (SIM_OPEN_KIND kind,
 
   /* Set default options before parsing user options.  */
   STATE_MACHS (sd) = bpf_sim_machs;
+  STATE_MODEL_NAME (sd) = "bpf-def";
 
   if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK)
     goto error;
index 63e7f3be345d9302f10b4976c36422dce231a107..5b86431c8bb034a523dfb44883fa8634f47dcc68 100644 (file)
@@ -1,3 +1,14 @@
+2021-06-30  Mike Frysinger  <vapier@gentoo.org>
+
+       * Make-common.in (SIM_DEFAULT_MODEL): Delete.
+       * sim-base.h (struct sim_state): Add model_name.
+       (STATE_MODEL_NAME): Define.
+       * sim-model.c (model_option_handler): Set STATE_MODEL_NAME.
+       (sim_model_init): Delete WITH_MODEL_P check.  Change
+       WITH_DEFAULT_MODEL to STATE_MODEL_NAME.
+       * sim-model.h (WITH_DEFAULT_MODEL): Delete.
+       (WITH_MODEL_P): Delete.
+
 2021-06-30  Mike Frysinger  <vapier@gentoo.org>
 
        * cgen-defs.h (cgen_cpu_max_extra_bytes): Add SIM_DESC arg.
index 723bda589c9b8a8560dbb460903af21c4378ff4b..992fd7f8a6eff882eeeb77081599b3cd8f44c106 100644 (file)
@@ -73,7 +73,6 @@ top_builddir = ..
 SHELL = @SHELL@
 
 SIM_BITSIZE = @sim_bitsize@
-SIM_DEFAULT_MODEL = @sim_default_model@
 SIM_FLOAT = @sim_float@
 SIM_RESERVED_BITS = @sim_reserved_bits@
 SIM_SCACHE = @sim_scache@
@@ -195,7 +194,6 @@ CGEN_INCLUDE_DEPS = \
 
 CONFIG_CFLAGS = \
        -DHAVE_CONFIG_H \
-       $(SIM_DEFAULT_MODEL) \
        $(SIM_BITSIZE) \
        $(SIM_FLOAT) \
        $(SIM_HW_CFLAGS) \
index 8eae988eb50be9a982b694f708f98d0288d05be5..674b2d4230847941063033f0e5268dba2d7d64ae 100644 (file)
@@ -147,6 +147,10 @@ struct sim_state {
   const SIM_MACH * const *machs;
 #define STATE_MACHS(sd) ((sd)->machs)
 
+  /* If non-NULL, the model to select for CPUs.  */
+  const char *model_name;
+#define STATE_MODEL_NAME(sd) ((sd)->model_name)
+
   /* In standalone simulator, this is the program's arguments passed
      on the command line.  */
   char **prog_argv;
index 4c5e463f1a07de3faa4b6405c2112362218d4ffc..98dcbeae6cc16a2dbac52c7e3914afc53336abf3 100644 (file)
@@ -68,6 +68,7 @@ model_option_handler (SIM_DESC sd, sim_cpu *cpu, int opt,
            sim_io_eprintf (sd, "unknown model `%s'\n", arg);
            return SIM_RC_FAIL;
          }
+       STATE_MODEL_NAME (sd) = arg;
        sim_model_set (sd, cpu, model);
        break;
       }
@@ -209,9 +210,6 @@ sim_model_init (SIM_DESC sd)
 {
   SIM_CPU *cpu;
 
-  if (!WITH_MODEL_P)
-    return SIM_RC_OK;
-
   /* If both cpu model and state architecture are set, ensure they're
      compatible.  If only one is set, set the other.  If neither are set,
      use the default model.  STATE_ARCHITECTURE is the bfd_arch_info data
@@ -222,10 +220,11 @@ sim_model_init (SIM_DESC sd)
   cpu = STATE_CPU (sd, 0);
 
   if (! STATE_ARCHITECTURE (sd)
-      && ! CPU_MACH (cpu))
+      && ! CPU_MACH (cpu)
+      && STATE_MODEL_NAME (sd))
     {
       /* Set the default model.  */
-      const SIM_MODEL *model = sim_model_lookup (sd, WITH_DEFAULT_MODEL);
+      const SIM_MODEL *model = sim_model_lookup (sd, STATE_MODEL_NAME (sd));
       SIM_ASSERT (model != NULL);
       sim_model_set (sd, NULL, model);
     }
@@ -242,7 +241,7 @@ sim_model_init (SIM_DESC sd)
          return SIM_RC_FAIL;
        }
     }
-  else if (STATE_ARCHITECTURE (sd))
+  else if (STATE_ARCHITECTURE (sd) && STATE_MACHS (sd))
     {
       /* Use the default model for the selected machine.
         The default model is the first one in the list.  */
@@ -257,7 +256,7 @@ sim_model_init (SIM_DESC sd)
        }
       sim_model_set (sd, NULL, MACH_MODELS (mach));
     }
-  else
+  else if (CPU_MACH (cpu))
     {
       STATE_ARCHITECTURE (sd) = bfd_scan_arch (MACH_BFD_NAME (CPU_MACH (cpu)));
     }
index e735feb4b9ad2dddfdd914f60bfc08b52b370194..ecef2571766ef1bec287bf496c35352399d0ac18 100644 (file)
@@ -47,13 +47,6 @@ typedef struct {
 #define MAX_UNITS 1
 #endif
 
-#ifndef WITH_DEFAULT_MODEL
-# define WITH_DEFAULT_MODEL NULL
-# define WITH_MODEL_P 0
-#else
-# define WITH_MODEL_P 1
-#endif
-
 typedef int (MODEL_FN) (sim_cpu *, void *);
 
 typedef struct {
index 94b45fd5f187cee1ce9110f1f1d9e91bfacad6ed..909f8e6832ac12138333c1ea75f39cec06a21867 100755 (executable)
@@ -640,7 +640,6 @@ am__EXEEXT_TRUE
 LTLIBOBJS
 SIM_RX_CYCLE_ACCURATE_FLAGS
 sim_reserved_bits
-sim_default_model
 sim_scache
 sim_float
 sim_bitsize
@@ -12180,7 +12179,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12183 "configure"
+#line 12182 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12286,7 +12285,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12289 "configure"
+#line 12288 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -14674,7 +14673,6 @@ fi
 
 
 
-
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sim rx should be cycle accurate" >&5
 $as_echo_n "checking whether sim rx should be cycle accurate... " >&6; }
 # Check whether --enable-sim-rx-cycle-accurate was given.
index 15b2b65c87e87d77414ce51f2b211574305d803e..0b31d2c5eefab8225ec4ebbe17cdaa762e446dff 100644 (file)
@@ -172,7 +172,6 @@ dnl respective SIM_AC_OPTION_xxx call above, we can drop these.
 AC_SUBST(sim_bitsize)
 AC_SUBST(sim_float)
 AC_SUBST(sim_scache)
-AC_SUBST(sim_default_model)
 AC_SUBST(sim_reserved_bits)
 
 dnl Some arches have unique configure flags.
index 292085038d554a5cab0784955b44fdd782d8ad14..9cdc48831c2e849848a23e3c52727eac36e20a4d 100644 (file)
@@ -1,3 +1,10 @@
+2021-06-30  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure.ac: Delete SIM_AC_OPTION_DEFAULT_MODEL call.
+       * sim-if.c (sim_open): Set STATE_MODEL_NAME.
+       * aclocal.m4: Regenerate.
+       * configure: Regenerate.
+
 2021-06-30  Mike Frysinger  <vapier@gentoo.org>
 
        * arch.c (sim_machs): Rename to ...
index 212a399016b4e71126f62f3c30b57edca311a1ff..ca624a71181d20f210f3f58179e4c6d38b147638 100644 (file)
@@ -12,6 +12,5 @@
 # PARTICULAR PURPOSE.
 
 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
-m4_include([../m4/sim_ac_option_default_model.m4])
 m4_include([../m4/sim_ac_option_scache.m4])
 m4_include([../m4/sim_ac_output.m4])
index a0bfa60110b2d932ae46873d4ab08f385dc7ff96..1f182822a71378428c5e12d08c56017f96c10e16 100755 (executable)
@@ -628,13 +628,11 @@ PACKAGE_TARNAME
 PACKAGE_NAME
 PATH_SEPARATOR
 SHELL
-sim_scache
-sim_default_model'
+sim_scache'
 ac_subst_files=''
 ac_user_opts='
 enable_option_checking
 enable_sim_scache
-enable_sim_default_model
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1248,8 +1246,6 @@ Optional Features:
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   --enable-sim-scache=size
                           Specify simulator execution cache size
-  --enable-sim-default-model=model
-                          Specify default model to simulate
 
 Report bugs to the package provider.
 _ACEOF
@@ -1701,24 +1697,6 @@ fi
 
 
 
-# The default model shouldn't matter as long as there's a BFD.
-
-default_sim_default_model="crisv32"
-# Check whether --enable-sim-default-model was given.
-if test "${enable_sim_default_model+set}" = set; then :
-  enableval=$enable_sim_default_model; case "${enableval}" in
-  yes|no) as_fn_error $? "\"Missing argument to --enable-sim-default-model\"" "$LINENO" 5;;
-  *)   sim_default_model="-DWITH_DEFAULT_MODEL='\"${enableval}\"'";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_default_model" != x""; then
-  echo "Setting default model = $sim_default_model" 6>&1
-fi
-else
-  sim_default_model="-DWITH_DEFAULT_MODEL='\"${default_sim_default_model}\"'"
-fi
-
-
-
 cgen_breaks=""
 if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
 cgen_breaks="break cgen_rtx_error";
@@ -1740,7 +1718,6 @@ ac_config_commands="$ac_config_commands stamp-h"
 
 
 
-
 SIM_COMMON_BUILD_TRUE='#'
 SIM_COMMON_BUILD_FALSE=
 
index 57a2d5fe3d7aaea220d3bf53ab0806b6129ed85e..d2037221bfee920ae4639565b04d0e2b7d74c8d6 100644 (file)
@@ -4,7 +4,4 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
 
 SIM_AC_OPTION_SCACHE(16384)
 
-# The default model shouldn't matter as long as there's a BFD.
-SIM_AC_OPTION_DEFAULT_MODEL(crisv32)
-
 SIM_AC_OUTPUT
index 37a1d5b558a0c4110d4b1f3cbbaf4fe973e3bb9b..2d7e9221505ab82e012bd510d8ccb37e34428f7e 100644 (file)
@@ -659,6 +659,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, struct bfd *abfd,
 
   /* Set default options before parsing user options.  */
   STATE_MACHS (sd) = cris_sim_machs;
+  STATE_MODEL_NAME (sd) = "crisv32";
   current_target_byte_order = BFD_ENDIAN_LITTLE;
 
   /* The cpu data is kept in a separately allocated chunk of memory.  */
index 7cc35c5f74d773ae4f4927bc70f3a8c4b94e5421..6db6b66c4514428e1ead02898aebdc5f81509382 100644 (file)
@@ -1,3 +1,10 @@
+2021-06-30  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure.ac: Delete SIM_AC_OPTION_DEFAULT_MODEL call.
+       * sim-if.c (sim_open): Set STATE_MODEL_NAME.
+       * aclocal.m4: Regenerate.
+       * configure: Regenerate.
+
 2021-06-30  Mike Frysinger  <vapier@gentoo.org>
 
        * arch.c (sim_machs): Rename to ...
index 212a399016b4e71126f62f3c30b57edca311a1ff..ca624a71181d20f210f3f58179e4c6d38b147638 100644 (file)
@@ -12,6 +12,5 @@
 # PARTICULAR PURPOSE.
 
 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
-m4_include([../m4/sim_ac_option_default_model.m4])
 m4_include([../m4/sim_ac_option_scache.m4])
 m4_include([../m4/sim_ac_output.m4])
index d3d21e2038a6bffc3da879c49d79f946e32d5eeb..dcd1a8763ff6a3c061601e04a097e9fab266aa8f 100755 (executable)
@@ -629,13 +629,11 @@ PACKAGE_TARNAME
 PACKAGE_NAME
 PATH_SEPARATOR
 SHELL
-sim_scache
-sim_default_model'
+sim_scache'
 ac_subst_files=''
 ac_user_opts='
 enable_option_checking
 enable_sim_scache
-enable_sim_default_model
 enable_sim_trapdump
 '
       ac_precious_vars='build_alias
@@ -1250,8 +1248,6 @@ Optional Features:
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   --enable-sim-scache=size
                           Specify simulator execution cache size
-  --enable-sim-default-model=model
-                          Specify default model to simulate
   --enable-sim-trapdump   Make unknown traps dump the registers
 
 Report bugs to the package provider.
@@ -1704,22 +1700,6 @@ fi
 
 
 
-default_sim_default_model="fr500"
-# Check whether --enable-sim-default-model was given.
-if test "${enable_sim_default_model+set}" = set; then :
-  enableval=$enable_sim_default_model; case "${enableval}" in
-  yes|no) as_fn_error $? "\"Missing argument to --enable-sim-default-model\"" "$LINENO" 5;;
-  *)   sim_default_model="-DWITH_DEFAULT_MODEL='\"${enableval}\"'";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_default_model" != x""; then
-  echo "Setting default model = $sim_default_model" 6>&1
-fi
-else
-  sim_default_model="-DWITH_DEFAULT_MODEL='\"${default_sim_default_model}\"'"
-fi
-
-
-
 #
 # Enable making unknown traps dump out registers
 #
@@ -1759,7 +1739,6 @@ ac_config_commands="$ac_config_commands stamp-h"
 
 
 
-
 SIM_COMMON_BUILD_TRUE='#'
 SIM_COMMON_BUILD_FALSE=
 
index 83ad0112844d3f32c3e51860fd55e7e31fceafbc..785a3bc1cc23ce7f7b64047e5a797a1dffceb9c0 100644 (file)
@@ -3,7 +3,6 @@ AC_INIT(Makefile.in)
 AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
 
 SIM_AC_OPTION_SCACHE(16384)
-SIM_AC_OPTION_DEFAULT_MODEL(fr500)
 
 #
 # Enable making unknown traps dump out registers
index 82f4bd845f5da605a421ac245aa678217b929dce..6d22aaddc090584f273a85364745ef97ca6dee37 100644 (file)
@@ -57,6 +57,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, bfd *abfd,
 
   /* Set default options before parsing user options.  */
   STATE_MACHS (sd) = frv_sim_machs;
+  STATE_MODEL_NAME (sd) = "fr500";
   current_alignment = STRICT_ALIGNMENT;
   current_target_byte_order = BFD_ENDIAN_BIG;
 
index 130c6bf726cf4dd1b59fad85387245c4e71c0dd5..60aa9665bb2c9954142a1232aea0fcdaabc5260e 100644 (file)
@@ -1,3 +1,10 @@
+2021-06-30  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure.ac: Delete SIM_AC_OPTION_DEFAULT_MODEL call.
+       * sim-if.c (sim_open): Set STATE_MODEL_NAME.
+       * aclocal.m4: Regenerate.
+       * configure: Regenerate.
+
 2021-06-30  Mike Frysinger  <vapier@gentoo.org>
 
        * arch.c (sim_machs): Rename to ...
index 212a399016b4e71126f62f3c30b57edca311a1ff..ca624a71181d20f210f3f58179e4c6d38b147638 100644 (file)
@@ -12,6 +12,5 @@
 # PARTICULAR PURPOSE.
 
 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
-m4_include([../m4/sim_ac_option_default_model.m4])
 m4_include([../m4/sim_ac_option_scache.m4])
 m4_include([../m4/sim_ac_output.m4])
index 8ed98a5694ee171e51d2a1f5587264a3c544a059..1f182822a71378428c5e12d08c56017f96c10e16 100755 (executable)
@@ -628,13 +628,11 @@ PACKAGE_TARNAME
 PACKAGE_NAME
 PATH_SEPARATOR
 SHELL
-sim_scache
-sim_default_model'
+sim_scache'
 ac_subst_files=''
 ac_user_opts='
 enable_option_checking
 enable_sim_scache
-enable_sim_default_model
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1248,8 +1246,6 @@ Optional Features:
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   --enable-sim-scache=size
                           Specify simulator execution cache size
-  --enable-sim-default-model=model
-                          Specify default model to simulate
 
 Report bugs to the package provider.
 _ACEOF
@@ -1701,22 +1697,6 @@ fi
 
 
 
-default_sim_default_model="iq2000"
-# Check whether --enable-sim-default-model was given.
-if test "${enable_sim_default_model+set}" = set; then :
-  enableval=$enable_sim_default_model; case "${enableval}" in
-  yes|no) as_fn_error $? "\"Missing argument to --enable-sim-default-model\"" "$LINENO" 5;;
-  *)   sim_default_model="-DWITH_DEFAULT_MODEL='\"${enableval}\"'";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_default_model" != x""; then
-  echo "Setting default model = $sim_default_model" 6>&1
-fi
-else
-  sim_default_model="-DWITH_DEFAULT_MODEL='\"${default_sim_default_model}\"'"
-fi
-
-
-
 cgen_breaks=""
 if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
 cgen_breaks="break cgen_rtx_error";
@@ -1738,7 +1718,6 @@ ac_config_commands="$ac_config_commands stamp-h"
 
 
 
-
 SIM_COMMON_BUILD_TRUE='#'
 SIM_COMMON_BUILD_FALSE=
 
index e35068f31f8c12717aeaefc086b969d28506b5a6..d2037221bfee920ae4639565b04d0e2b7d74c8d6 100644 (file)
@@ -3,6 +3,5 @@ AC_INIT(Makefile.in)
 AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
 
 SIM_AC_OPTION_SCACHE(16384)
-SIM_AC_OPTION_DEFAULT_MODEL(iq2000)
 
 SIM_AC_OUTPUT
index 6df4b944300e5e0d140e4b9b85409e839fae5f14..9728882dac51a1639269481c1e31549da338832d 100644 (file)
@@ -64,6 +64,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, struct bfd *abfd,
 
   /* Set default options before parsing user options.  */
   STATE_MACHS (sd) = iq2000_sim_machs;
+  STATE_MODEL_NAME (sd) = "iq2000";
   current_alignment = STRICT_ALIGNMENT;
   current_target_byte_order = BFD_ENDIAN_BIG;
 
index 6d2d238d66f432773c09e527566fa76afdcf0aa8..f9092a93517804bf186cf2e5b6ac5f7397508442 100644 (file)
@@ -1,3 +1,10 @@
+2021-06-30  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure.ac: Delete SIM_AC_OPTION_DEFAULT_MODEL call.
+       * sim-if.c (sim_open): Set STATE_MODEL_NAME.
+       * aclocal.m4: Regenerate.
+       * configure: Regenerate.
+
 2021-06-30  Mike Frysinger  <vapier@gentoo.org>
 
        * arch.c (sim_machs): Rename to ...
index 212a399016b4e71126f62f3c30b57edca311a1ff..ca624a71181d20f210f3f58179e4c6d38b147638 100644 (file)
@@ -12,6 +12,5 @@
 # PARTICULAR PURPOSE.
 
 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
-m4_include([../m4/sim_ac_option_default_model.m4])
 m4_include([../m4/sim_ac_option_scache.m4])
 m4_include([../m4/sim_ac_output.m4])
index 2fa956b1fd482acd86e6c2c283243e1db69d400c..1f182822a71378428c5e12d08c56017f96c10e16 100755 (executable)
@@ -628,13 +628,11 @@ PACKAGE_TARNAME
 PACKAGE_NAME
 PATH_SEPARATOR
 SHELL
-sim_scache
-sim_default_model'
+sim_scache'
 ac_subst_files=''
 ac_user_opts='
 enable_option_checking
 enable_sim_scache
-enable_sim_default_model
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1248,8 +1246,6 @@ Optional Features:
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   --enable-sim-scache=size
                           Specify simulator execution cache size
-  --enable-sim-default-model=model
-                          Specify default model to simulate
 
 Report bugs to the package provider.
 _ACEOF
@@ -1701,22 +1697,6 @@ fi
 
 
 
-default_sim_default_model="lm32"
-# Check whether --enable-sim-default-model was given.
-if test "${enable_sim_default_model+set}" = set; then :
-  enableval=$enable_sim_default_model; case "${enableval}" in
-  yes|no) as_fn_error $? "\"Missing argument to --enable-sim-default-model\"" "$LINENO" 5;;
-  *)   sim_default_model="-DWITH_DEFAULT_MODEL='\"${enableval}\"'";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_default_model" != x""; then
-  echo "Setting default model = $sim_default_model" 6>&1
-fi
-else
-  sim_default_model="-DWITH_DEFAULT_MODEL='\"${default_sim_default_model}\"'"
-fi
-
-
-
 cgen_breaks=""
 if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
 cgen_breaks="break cgen_rtx_error";
@@ -1738,7 +1718,6 @@ ac_config_commands="$ac_config_commands stamp-h"
 
 
 
-
 SIM_COMMON_BUILD_TRUE='#'
 SIM_COMMON_BUILD_FALSE=
 
index 96b6f0e98e25f6ea53bdaeff04656c762469e9e9..d2037221bfee920ae4639565b04d0e2b7d74c8d6 100644 (file)
@@ -3,6 +3,5 @@ AC_INIT(Makefile.in)
 AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
 
 SIM_AC_OPTION_SCACHE(16384)
-SIM_AC_OPTION_DEFAULT_MODEL(lm32)
 
 SIM_AC_OUTPUT
index abb9ad7b042c43011da8d72f05cd2288b46bcb7b..f9143ea00375be21f352558932286a512873d9ce 100644 (file)
@@ -95,6 +95,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, struct bfd *abfd,
 
   /* Set default options before parsing user options.  */
   STATE_MACHS (sd) = lm32_sim_machs;
+  STATE_MODEL_NAME (sd) = "lm32";
   current_alignment = STRICT_ALIGNMENT;
   current_target_byte_order = BFD_ENDIAN_BIG;
 
index d2abefc90b969f8d6eac1d27a4b752e7952f110a..d738f5d21ca2b6b3b1f3549313e002d4667ccb67 100644 (file)
@@ -1,3 +1,10 @@
+2021-06-30  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure.ac: Delete SIM_AC_OPTION_DEFAULT_MODEL call.
+       * sim-if.c (sim_open): Set STATE_MODEL_NAME.
+       * aclocal.m4: Regenerate.
+       * configure: Regenerate.
+
 2021-06-30  Mike Frysinger  <vapier@gentoo.org>
 
        * arch.c (sim_machs): Rename to ...
index 212a399016b4e71126f62f3c30b57edca311a1ff..ca624a71181d20f210f3f58179e4c6d38b147638 100644 (file)
@@ -12,6 +12,5 @@
 # PARTICULAR PURPOSE.
 
 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
-m4_include([../m4/sim_ac_option_default_model.m4])
 m4_include([../m4/sim_ac_option_scache.m4])
 m4_include([../m4/sim_ac_output.m4])
index e9b4b76d75a58a30dd9942f81ae308be9fc7b7f9..25077ddb7cd7b59f2cdfa32b564dee9b65d14a12 100755 (executable)
@@ -630,13 +630,11 @@ PACKAGE_TARNAME
 PACKAGE_NAME
 PATH_SEPARATOR
 SHELL
-sim_scache
-sim_default_model'
+sim_scache'
 ac_subst_files=''
 ac_user_opts='
 enable_option_checking
 enable_sim_scache
-enable_sim_default_model
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1250,8 +1248,6 @@ Optional Features:
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   --enable-sim-scache=size
                           Specify simulator execution cache size
-  --enable-sim-default-model=model
-                          Specify default model to simulate
 
 Report bugs to the package provider.
 _ACEOF
@@ -1703,22 +1699,6 @@ fi
 
 
 
-default_sim_default_model="m32r/d"
-# Check whether --enable-sim-default-model was given.
-if test "${enable_sim_default_model+set}" = set; then :
-  enableval=$enable_sim_default_model; case "${enableval}" in
-  yes|no) as_fn_error $? "\"Missing argument to --enable-sim-default-model\"" "$LINENO" 5;;
-  *)   sim_default_model="-DWITH_DEFAULT_MODEL='\"${enableval}\"'";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_default_model" != x""; then
-  echo "Setting default model = $sim_default_model" 6>&1
-fi
-else
-  sim_default_model="-DWITH_DEFAULT_MODEL='\"${default_sim_default_model}\"'"
-fi
-
-
-
   case "${target_alias}" in
   m32r*-linux*)
     traps_obj=traps-linux.o
@@ -1753,7 +1733,6 @@ ac_config_commands="$ac_config_commands stamp-h"
 
 
 
-
 SIM_COMMON_BUILD_TRUE='#'
 SIM_COMMON_BUILD_FALSE=
 
index f98adb26c46d945c5d1eba09a3e35d2127aa1df3..eed2e91c87a725a1521e75b8ce3a17d6d340f58a 100644 (file)
@@ -3,7 +3,6 @@ AC_INIT(Makefile.in)
 AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
 
 SIM_AC_OPTION_SCACHE(16384)
-SIM_AC_OPTION_DEFAULT_MODEL(m32r/d)
 
   case "${target_alias}" in
   m32r*-linux*)
index 33ae7c106e391b42016202982f39f0ea4d1fad85..8957e83bf3341f5af7a743a953f8391e0242da15 100644 (file)
@@ -58,6 +58,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, struct bfd *abfd,
 
   /* Set default options before parsing user options.  */
   STATE_MACHS (sd) = m32r_sim_machs;
+  STATE_MODEL_NAME (sd) = "m32r/d";
   current_alignment = STRICT_ALIGNMENT;
   current_target_byte_order = BFD_ENDIAN_BIG;
 
diff --git a/sim/m4/sim_ac_option_default_model.m4 b/sim/m4/sim_ac_option_default_model.m4
deleted file mode 100644 (file)
index 1150937..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-dnl   Copyright (C) 1997-2021 Free Software Foundation, Inc.
-dnl
-dnl This program is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 3 of the License, or
-dnl (at your option) any later version.
-dnl
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with this program.  If not, see <http://www.gnu.org/licenses/>.
-dnl
-dnl The argument is the default model if none is specified.
-AC_DEFUN([SIM_AC_OPTION_DEFAULT_MODEL],
-[
-default_sim_default_model="ifelse([$1],,0,[$1])"
-AC_ARG_ENABLE(sim-default-model,
-[AS_HELP_STRING([--enable-sim-default-model=model],
-               [Specify default model to simulate])],
-[case "${enableval}" in
-  yes|no) AC_MSG_ERROR("Missing argument to --enable-sim-default-model");;
-  *)   sim_default_model="-DWITH_DEFAULT_MODEL='\"${enableval}\"'";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_default_model" != x""; then
-  echo "Setting default model = $sim_default_model" 6>&1
-fi],[sim_default_model="-DWITH_DEFAULT_MODEL='\"${default_sim_default_model}\"'"])
-])
-AC_SUBST(sim_default_model)
index f9f70167e59c1207c4267092519819dd2c60d3a7..100e2f9b4024267a093d62584691bf8af3dc0008 100644 (file)
@@ -48,7 +48,6 @@ dnl when the rest of the code is in the respective macros.
 AC_SUBST(sim_bitsize)
 AC_SUBST(sim_float)
 AC_SUBST(sim_scache)
-AC_SUBST(sim_default_model)
 AC_SUBST(sim_reserved_bits)
 
 dnl Used by common/Make-common.in to see which configure script created it.
index a84059db38e3f874f1cdb5835351a53923a9db3d..2db73e54e321214ed0dbabc32f13b074e02dccc2 100644 (file)
@@ -1,3 +1,7 @@
+2021-06-30  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure: Regenerate.
+
 2021-06-22  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 89c16a7ddfd1d15cb647d3b07f6545d853be1188..2cc8d314e8850e7d35a4540c989489f3acae21ad 100755 (executable)
@@ -586,7 +586,6 @@ ac_subst_vars='LTLIBOBJS
 LIBOBJS
 SIM_COMMON_BUILD_FALSE
 SIM_COMMON_BUILD_TRUE
-sim_default_model
 sim_scache
 cgen_breaks
 sim_multi_obj
@@ -2212,7 +2211,6 @@ ac_config_commands="$ac_config_commands stamp-h"
 
 
 
-
 SIM_COMMON_BUILD_TRUE='#'
 SIM_COMMON_BUILD_FALSE=
 
index 48e8415ee3fea35b1f42eb8a18e75128abc0f98c..b983278d10f2a8b47e705baf0ee0e80afd69581d 100644 (file)
@@ -1,3 +1,7 @@
+2021-06-30  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure: Regenerate.
+
 2021-06-22  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 14257c4e33b2105ab33f896ab8dc5ddc1686b73a..91c58e5ba2a383a4b6ae6062709e7d8722f45114 100755 (executable)
@@ -586,7 +586,6 @@ ac_subst_vars='LTLIBOBJS
 LIBOBJS
 SIM_COMMON_BUILD_FALSE
 SIM_COMMON_BUILD_TRUE
-sim_default_model
 sim_scache
 sim_float
 cgen_breaks
@@ -1778,7 +1777,6 @@ ac_config_commands="$ac_config_commands stamp-h"
 
 
 
-
 SIM_COMMON_BUILD_TRUE='#'
 SIM_COMMON_BUILD_FALSE=
 
index 94e7e0e8c2ca0e01a39177550dd41ab91b4d3a4c..9cd2f225c607a9e2c25a91082d8d91d46ec52ad8 100644 (file)
@@ -1,3 +1,10 @@
+2021-06-30  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure.ac: Delete SIM_AC_OPTION_DEFAULT_MODEL call.
+       * sim-if.c (sim_open): Set STATE_MODEL_NAME.
+       * aclocal.m4: Regenerate.
+       * configure: Regenerate.
+
 2021-06-30  Mike Frysinger  <vapier@gentoo.org>
 
        * arch.c (sim_machs): Rename to ...
index d0f761fd802854f52067822d764a2a04cbcabe7f..90a839c26137e3e4eaeba9819a834015ff15140f 100644 (file)
@@ -13,6 +13,5 @@
 
 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
 m4_include([../m4/sim_ac_option_bitsize.m4])
-m4_include([../m4/sim_ac_option_default_model.m4])
 m4_include([../m4/sim_ac_option_scache.m4])
 m4_include([../m4/sim_ac_output.m4])
index adf13d0b0a46f8a7b4eccf52c5dcce7fcdd51fa0..3677607e0a79f7f7d7382edc569e05cbad184e78 100755 (executable)
@@ -628,14 +628,12 @@ PACKAGE_NAME
 PATH_SEPARATOR
 SHELL
 sim_scache
-sim_default_model
 sim_bitsize'
 ac_subst_files=''
 ac_user_opts='
 enable_option_checking
 enable_sim_bitsize
 enable_sim_scache
-enable_sim_default_model
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1250,8 +1248,6 @@ Optional Features:
   --enable-sim-bitsize=N  Specify target bitsize (32 or 64)
   --enable-sim-scache=size
                           Specify simulator execution cache size
-  --enable-sim-default-model=model
-                          Specify default model to simulate
 
 Report bugs to the package provider.
 _ACEOF
@@ -1762,22 +1758,6 @@ fi
 
 
 
-default_sim_default_model="or1200"
-# Check whether --enable-sim-default-model was given.
-if test "${enable_sim_default_model+set}" = set; then :
-  enableval=$enable_sim_default_model; case "${enableval}" in
-  yes|no) as_fn_error $? "\"Missing argument to --enable-sim-default-model\"" "$LINENO" 5;;
-  *)   sim_default_model="-DWITH_DEFAULT_MODEL='\"${enableval}\"'";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_default_model" != x""; then
-  echo "Setting default model = $sim_default_model" 6>&1
-fi
-else
-  sim_default_model="-DWITH_DEFAULT_MODEL='\"${default_sim_default_model}\"'"
-fi
-
-
-
 cgen_breaks=""
 if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
 cgen_breaks="break cgen_rtx_error";
@@ -1799,7 +1779,6 @@ ac_config_commands="$ac_config_commands stamp-h"
 
 
 
-
 SIM_COMMON_BUILD_TRUE='#'
 SIM_COMMON_BUILD_FALSE=
 
index c72c80c5f47ac9d3df7df49f4437419843864ce2..aaeb121356540f08f308973b0bad202805ce451a 100644 (file)
@@ -4,6 +4,5 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
 
 SIM_AC_OPTION_BITSIZE([32], [31], [32])
 SIM_AC_OPTION_SCACHE(16384)
-SIM_AC_OPTION_DEFAULT_MODEL([or1200])
 
 SIM_AC_OUTPUT
index e8353887c828e4adee7269d061fce5a2aa5f8604..3f47ce5e41b62d8b48dff11869d623f53d663998 100644 (file)
@@ -164,6 +164,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, struct bfd *abfd,
 
   /* Set default options before parsing user options.  */
   STATE_MACHS (sd) = or1k_sim_machs;
+  STATE_MODEL_NAME (sd) = "or1200";
   current_target_byte_order = BFD_ENDIAN_BIG;
 
   /* The cpu data is kept in a separately allocated chunk of memory.  */
index 1c98ed58338d980329d54b19f3c8a7a38d292659..ec4f69a8408b277cb08522ec2aa117a8a42f502b 100644 (file)
@@ -1,3 +1,10 @@
+2021-06-30  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure.ac: Delete SIM_AC_OPTION_DEFAULT_MODEL call.
+       * interp.c (sim_open): Set STATE_MODEL_NAME.
+       * aclocal.m4: Regenerate.
+       * configure: Regenerate.
+
 2021-06-30  Mike Frysinger  <vapier@gentoo.org>
 
        * interp.c (sim_open): Set STATE_MACHS.
index 39198e597597fc980623bfa7fbfba2d045c3479b..3b7f0c1f4a443eb3a8752dd8cd3b199b9f8a0e6d 100644 (file)
@@ -13,5 +13,4 @@
 
 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
 m4_include([../m4/sim_ac_option_bitsize.m4])
-m4_include([../m4/sim_ac_option_default_model.m4])
 m4_include([../m4/sim_ac_output.m4])
index b8b789a6bd607ff7b789447660fadfc2216e7038..c2e53cc8c6d74998dae46a93eaf5a96272563105 100755 (executable)
@@ -628,12 +628,10 @@ PACKAGE_TARNAME
 PACKAGE_NAME
 PATH_SEPARATOR
 SHELL
-sim_default_model
 sim_bitsize'
 ac_subst_files=''
 ac_user_opts='
 enable_option_checking
-enable_sim_default_model
 enable_sim_bitsize
 '
       ac_precious_vars='build_alias
@@ -1246,8 +1244,6 @@ Optional Features:
   --disable-option-checking  ignore unrecognized --enable/--with options
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --enable-sim-default-model=model
-                          Specify default model to simulate
   --enable-sim-bitsize=N  Specify target bitsize (32 or 64)
 
 Report bugs to the package provider.
@@ -1680,29 +1676,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
-# Select the default model for the target.
-riscv_model=
-case "${target}" in
-riscv32*) riscv_model="RV32G" ;;
-riscv*) riscv_model="RV64G" ;;
-esac
-
-default_sim_default_model="${riscv_model}"
-# Check whether --enable-sim-default-model was given.
-if test "${enable_sim_default_model+set}" = set; then :
-  enableval=$enable_sim_default_model; case "${enableval}" in
-  yes|no) as_fn_error $? "\"Missing argument to --enable-sim-default-model\"" "$LINENO" 5;;
-  *)   sim_default_model="-DWITH_DEFAULT_MODEL='\"${enableval}\"'";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_default_model" != x""; then
-  echo "Setting default model = $sim_default_model" 6>&1
-fi
-else
-  sim_default_model="-DWITH_DEFAULT_MODEL='\"${default_sim_default_model}\"'"
-fi
-
-
-
 # Select the bitsize of the target.
 riscv_addr_bitsize=
 case "${target}" in
@@ -1790,7 +1763,6 @@ ac_config_commands="$ac_config_commands stamp-h"
 
 
 
-
 SIM_COMMON_BUILD_TRUE='#'
 SIM_COMMON_BUILD_FALSE=
 
index 01afe511ca8ed8ee00287988b5cd3e1af6e10a86..6edb28c863eda16f519eeb93ec454d0772b3d82e 100644 (file)
@@ -2,14 +2,6 @@ dnl Process this file with autoconf to produce a configure script.
 AC_INIT(Makefile.in)
 AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
 
-# Select the default model for the target.
-riscv_model=
-case "${target}" in
-riscv32*) riscv_model="RV32G" ;;
-riscv*) riscv_model="RV64G" ;;
-esac
-SIM_AC_OPTION_DEFAULT_MODEL(${riscv_model})
-
 # Select the bitsize of the target.
 riscv_addr_bitsize=
 case "${target}" in
index 8908ed12ae874f5e80e8369d15ea50db7bba76f2..202412ab8ca0b71b6cf22b39386e8a63a9a589fa 100644 (file)
@@ -66,6 +66,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback,
 
   /* Set default options before parsing user options.  */
   STATE_MACHS (sd) = riscv_sim_machs;
+  STATE_MODEL_NAME (sd) = WITH_TARGET_WORD_BITSIZE == 32 ? "RV32G" : "RV64G";
   current_target_byte_order = BFD_ENDIAN_LITTLE;
 
   /* The cpu data is kept in a separately allocated chunk of memory.  */
index f14ab0fe229c289378da57bf59d5c3fc9d951cda..b68aff037848fefe8a242c4ce04dc5d69edb208e 100644 (file)
@@ -1,3 +1,7 @@
+2021-06-30  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure: Regenerate.
+
 2021-06-22  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 14257c4e33b2105ab33f896ab8dc5ddc1686b73a..91c58e5ba2a383a4b6ae6062709e7d8722f45114 100755 (executable)
@@ -586,7 +586,6 @@ ac_subst_vars='LTLIBOBJS
 LIBOBJS
 SIM_COMMON_BUILD_FALSE
 SIM_COMMON_BUILD_TRUE
-sim_default_model
 sim_scache
 sim_float
 cgen_breaks
@@ -1778,7 +1777,6 @@ ac_config_commands="$ac_config_commands stamp-h"
 
 
 
-
 SIM_COMMON_BUILD_TRUE='#'
 SIM_COMMON_BUILD_FALSE=