+2021-05-17 Mike Frysinger <vapier@gentoo.org>
+
+ * sim-main.h (struct sim_state): Delete.
+
2021-05-16 Mike Frysinger <vapier@gentoo.org>
* bpf-helpers.c, bpf.c, sim-if.c, traps.c: Include defs.h.
#endif
};
-\f
-
-struct sim_state
-{
- sim_cpu *cpu[MAX_NR_PROCESSORS];
- CGEN_STATE cgen_state;
- sim_state_base base;
-};
-
#endif /* ! SIM_MAIN_H */
+2021-05-17 Mike Frysinger <vapier@gentoo.org>
+
+ * cgen-defs.h (STATE_RUN_FAST_P): Call STATE_CGEN_STATE.
+ * sim-base.h [CGEN_ARCH]: Include cgen-sim.h and define
+ SIM_HAVE_COMMON_SIM_STATE.
+ (struct sim_state): Add cgen_state.
+ (STATE_CGEN_STATE): Define.
+
2021-05-17 Mike Frysinger <vapier@gentoo.org>
* sim-base.h (struct sim_state): Update comment.
typedef struct cgen_state {
/* Non-zero if no tracing or profiling is selected. */
int run_fast_p;
-#define STATE_RUN_FAST_P(sd) ((sd) -> cgen_state.run_fast_p)
+#define STATE_RUN_FAST_P(sd) (STATE_CGEN_STATE (sd).run_fast_p)
} CGEN_STATE;
\f
/* Various utilities. */
#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. */
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
+2021-05-17 Mike Frysinger <vapier@gentoo.org>
+
+ * sim-main.h (struct sim_state): Delete.
+
2021-05-16 Mike Frysinger <vapier@gentoo.org>
* cris-tmpl.c, crisv10f.c, crisv32f.c, dv-cris.c, dv-cris_900000xx.c,
#endif
};
\f
-/* The sim_state struct. */
-
-struct sim_state {
- sim_cpu *cpu[MAX_NR_PROCESSORS];
-
- CGEN_STATE cgen_state;
-
- sim_state_base base;
-};
-\f
/* Misc. */
/* Catch address exceptions. */
+2021-05-17 Mike Frysinger <vapier@gentoo.org>
+
+ * sim-main.h (struct sim_state): Delete.
+
2021-05-16 Mike Frysinger <vapier@gentoo.org>
* cache.c, frv.c, interrupts.c, memory.c, options.c, pipeline.c,
#endif /* defined (WANT_CPU_FRVBF) */
};
\f
-/* The sim_state struct. */
-
-struct sim_state {
- sim_cpu *cpu[MAX_NR_PROCESSORS];
-
- CGEN_STATE cgen_state;
-
- sim_state_base base;
-};
-\f
/* Misc. */
/* Catch address exceptions. */
+2021-05-17 Mike Frysinger <vapier@gentoo.org>
+
+ * sim-main.h (struct sim_state): Delete.
+
2021-05-16 Mike Frysinger <vapier@gentoo.org>
* iq2000.c, sim-if.c: Include defs.h.
#endif
};
\f
-/* The sim_state struct. */
-
-struct sim_state {
- sim_cpu *cpu[MAX_NR_PROCESSORS];
-
- CGEN_STATE cgen_state;
-
- sim_state_base base;
-};
-\f
/* Misc. */
/* Catch address exceptions. */
+2021-05-17 Mike Frysinger <vapier@gentoo.org>
+
+ * sim-main.h (struct sim_state): Delete.
+
2021-05-16 Mike Frysinger <vapier@gentoo.org>
* dv-lm32cpu.c, dv-lm32timer.c, dv-lm32uart.c, lm32.c, sim-if.c,
LM32BF_CPU_DATA cpu_data;
#endif
-};
-\f
-/* The sim_state struct. */
-
-struct sim_state
-{
- sim_cpu *cpu[MAX_NR_PROCESSORS];
-
- CGEN_STATE cgen_state;
-
- sim_state_base base;
};
\f
/* Misc. */
+2021-05-17 Mike Frysinger <vapier@gentoo.org>
+
+ * sim-main.h (struct sim_state): Delete.
+
2021-05-16 Mike Frysinger <vapier@gentoo.org>
* dv-m32r_cache.c, dv-m32r_uart.c: Replace config.h include with
#endif
};
\f
-/* The sim_state struct. */
-
-struct sim_state {
- sim_cpu *cpu[MAX_NR_PROCESSORS];
-
- CGEN_STATE cgen_state;
-
- sim_state_base base;
-};
-\f
/* Misc. */
/* Catch address exceptions. */
+2021-05-17 Mike Frysinger <vapier@gentoo.org>
+
+ * sim-main.h: Move or1k-opc.h include.
+ (struct sim_state): Delete.
+
2021-05-16 Mike Frysinger <vapier@gentoo.org>
* sim-main.h: Delete config.h include.
#include "ansidecl.h"
#include "or1k-desc.h"
+#include "or1k-opc.h"
#include "sim-basics.h"
#include "cgen-types.h"
#include "arch.h"
#include "sim-base.h"
#include "sim-fpu.h"
-#include "or1k-opc.h"
#include "cgen-sim.h"
#include "or1k-sim.h"
#endif
};
-\f
-
-/* The sim_state struct. */
-struct sim_state
-{
- sim_cpu *cpu[MAX_NR_PROCESSORS];
-
- CGEN_STATE cgen_state;
-
- sim_state_base base;
-};
-
#endif /* SIM_MAIN_H */