aboutsummaryrefslogtreecommitdiff
path: root/sim/bpf
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-06-28 22:07:44 -0400
committerMike Frysinger <vapier@gentoo.org>2021-06-30 02:57:45 -0400
commitd414eb3e7fc1e82d68e69ba6a9a867b9d9a9dba2 (patch)
treec82ef917cb7fabce6d96e5357474f398b7de73be /sim/bpf
parent1c636da093f335cd57e7fca0fc25ae9f9e849264 (diff)
downloadgdb-d414eb3e7fc1e82d68e69ba6a9a867b9d9a9dba2.zip
gdb-d414eb3e7fc1e82d68e69ba6a9a867b9d9a9dba2.tar.gz
gdb-d414eb3e7fc1e82d68e69ba6a9a867b9d9a9dba2.tar.bz2
sim: move default model to the runtime sim state
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.
Diffstat (limited to 'sim/bpf')
-rw-r--r--sim/bpf/ChangeLog7
-rw-r--r--sim/bpf/aclocal.m41
-rwxr-xr-xsim/bpf/configure21
-rw-r--r--sim/bpf/configure.ac1
-rw-r--r--sim/bpf/sim-if.c1
5 files changed, 8 insertions, 23 deletions
diff --git a/sim/bpf/ChangeLog b/sim/bpf/ChangeLog
index 959c63f..63037fd 100644
--- a/sim/bpf/ChangeLog
+++ b/sim/bpf/ChangeLog
@@ -1,5 +1,12 @@
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 ...
(bpf_sim_machs): ... this.
* sim-if.c (bpf_sim_machs): New decl.
diff --git a/sim/bpf/aclocal.m4 b/sim/bpf/aclocal.m4
index d0f761f..90a839c 100644
--- a/sim/bpf/aclocal.m4
+++ b/sim/bpf/aclocal.m4
@@ -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])
diff --git a/sim/bpf/configure b/sim/bpf/configure
index 2dc2ee2..de2798c 100755
--- a/sim/bpf/configure
+++ b/sim/bpf/configure
@@ -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=
diff --git a/sim/bpf/configure.ac b/sim/bpf/configure.ac
index 3272937..9cbd202 100644
--- a/sim/bpf/configure.ac
+++ b/sim/bpf/configure.ac
@@ -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
diff --git a/sim/bpf/sim-if.c b/sim/bpf/sim-if.c
index 150f5cd..aba191d 100644
--- a/sim/bpf/sim-if.c
+++ b/sim/bpf/sim-if.c
@@ -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;