summaryrefslogtreecommitdiff
path: root/sim/common/sim-base.h
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2016-01-21 21:13:06 -0500
committerMike Frysinger <vapier@gentoo.org>2021-05-17 00:46:32 -0400
commite106fc358c217f8f1e09cfdd383f564178c8f5eb (patch)
tree58cfffc4d30435963e4d9ce7ce7c7ca77635ae63 /sim/common/sim-base.h
parent85d93de3d8e24b54516ece8ec95ab09e6786e102 (diff)
downloadbinutils-gdb-e106fc358c217f8f1e09cfdd383f564178c8f5eb.tar.gz
sim: cgen: invert sim_state storage for cgen ports
Diffstat (limited to 'sim/common/sim-base.h')
-rw-r--r--sim/common/sim-base.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/sim/common/sim-base.h b/sim/common/sim-base.h
index f38e8412aed..e552d94d02c 100644
--- a/sim/common/sim-base.h
+++ b/sim/common/sim-base.h
@@ -88,6 +88,10 @@ typedef struct _sim_cpu sim_cpu;
#include "sim-cpu.h"
#include "sim-assert.h"
+#ifdef CGEN_ARCH
+# include "cgen-sim.h"
+# define SIM_HAVE_COMMON_SIM_STATE
+#endif
/* We require all sims to dynamically allocate cpus. See comment up top about
struct sim_state. */
@@ -232,6 +236,12 @@ struct sim_state {
target should define a struct and use it here. */
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)
};
#endif