aboutsummaryrefslogtreecommitdiff
path: root/sim/common/sim-base.h
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-06-05 10:21:46 -0400
committerMike Frysinger <vapier@gentoo.org>2021-06-09 18:21:28 -0400
commit906192d7859f9e768fc73f330e10d3b3a4ddaba3 (patch)
treef55e6c1aad3a8083932ffd01027856078a0d6a28 /sim/common/sim-base.h
parentc70fdc45f60845852f98eae3b8035de1a2df78de (diff)
downloadfsf-binutils-gdb-906192d7859f9e768fc73f330e10d3b3a4ddaba3.zip
fsf-binutils-gdb-906192d7859f9e768fc73f330e10d3b3a4ddaba3.tar.gz
fsf-binutils-gdb-906192d7859f9e768fc73f330e10d3b3a4ddaba3.tar.bz2
sim: cgen: inline cgen_init logic
This function has done only one thing: post-process command line settings to see if profiling or tracing has been enabled, and if so, set the run_fast_p flag in the simulator state. That flag is only used in one place: to select the fast or slow cgen engine. By inlining the run_fast_p logic to the one place it's used, we can delete a good amount of logic specific to cgen ports: both the call to cgen_init and the conditional simulator state. This in turn allows us to have a single simulator state struct across all ports so we can share objects more between them, and makes the sim_open calls look more consistent.
Diffstat (limited to 'sim/common/sim-base.h')
-rw-r--r--sim/common/sim-base.h10
1 files changed, 0 insertions, 10 deletions
diff --git a/sim/common/sim-base.h b/sim/common/sim-base.h
index 7dbf294..054b2ba 100644
--- a/sim/common/sim-base.h
+++ b/sim/common/sim-base.h
@@ -88,10 +88,6 @@ typedef struct _sim_cpu sim_cpu;
#include "sim-cpu.h"
#include "sim-assert.h"
-#ifdef CGEN_ARCH
-# include "cgen-sim.h"
-#endif
-
struct sim_state {
/* All the cpus for this instance. */
sim_cpu *cpu[MAX_NR_PROCESSORS];
@@ -217,12 +213,6 @@ struct sim_state {
void *arch_data;
#define STATE_ARCH_DATA(sd) ((sd)->arch_data)
-#ifdef CGEN_ARCH
- /* Various cgen runtime state. */
- CGEN_STATE cgen_state;
-#endif
-#define STATE_CGEN_STATE(sd) ((sd)->cgen_state)
-
/* Marker for those wanting to do sanity checks.
This should remain the last member of this struct to help catch
miscompilation errors. */