From e106fc358c217f8f1e09cfdd383f564178c8f5eb Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 21 Jan 2016 21:13:06 -0500 Subject: sim: cgen: invert sim_state storage for cgen ports --- sim/common/sim-base.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'sim/common/sim-base.h') diff --git a/sim/common/sim-base.h b/sim/common/sim-base.h index f38e841..e552d94 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 -- cgit v1.1