aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
Diffstat (limited to 'sim')
-rw-r--r--sim/aarch64/ChangeLog4
-rw-r--r--sim/aarch64/sim-main.h2
-rw-r--r--sim/arm/ChangeLog4
-rw-r--r--sim/arm/sim-main.h2
-rw-r--r--sim/avr/ChangeLog4
-rw-r--r--sim/avr/sim-main.h2
-rw-r--r--sim/bfin/ChangeLog4
-rw-r--r--sim/bfin/sim-main.h2
-rw-r--r--sim/common/ChangeLog37
-rw-r--r--sim/common/sim-base.h88
-rw-r--r--sim/common/sim-utils.c2
-rw-r--r--sim/cr16/ChangeLog4
-rw-r--r--sim/cr16/sim-main.h2
-rw-r--r--sim/d10v/ChangeLog4
-rw-r--r--sim/d10v/sim-main.h2
-rw-r--r--sim/example-synacor/ChangeLog4
-rw-r--r--sim/example-synacor/sim-main.h2
-rw-r--r--sim/ft32/ChangeLog4
-rw-r--r--sim/ft32/sim-main.h2
-rw-r--r--sim/h8300/ChangeLog4
-rw-r--r--sim/h8300/sim-main.h2
-rw-r--r--sim/m68hc11/ChangeLog4
-rw-r--r--sim/m68hc11/sim-main.h2
-rw-r--r--sim/mcore/ChangeLog4
-rw-r--r--sim/mcore/sim-main.h2
-rw-r--r--sim/microblaze/ChangeLog4
-rw-r--r--sim/microblaze/sim-main.h2
-rw-r--r--sim/mips/ChangeLog4
-rw-r--r--sim/mips/sim-main.h2
-rw-r--r--sim/mn10300/ChangeLog4
-rw-r--r--sim/mn10300/sim-main.h2
-rw-r--r--sim/moxie/ChangeLog4
-rw-r--r--sim/moxie/sim-main.h2
-rw-r--r--sim/msp430/ChangeLog4
-rw-r--r--sim/msp430/sim-main.h2
-rw-r--r--sim/pru/ChangeLog4
-rw-r--r--sim/pru/sim-main.h2
-rw-r--r--sim/riscv/ChangeLog4
-rw-r--r--sim/riscv/sim-main.h2
-rw-r--r--sim/sh/ChangeLog4
-rw-r--r--sim/sh/sim-main.h2
-rw-r--r--sim/v850/ChangeLog4
-rw-r--r--sim/v850/sim-main.h2
43 files changed, 154 insertions, 93 deletions
diff --git a/sim/aarch64/ChangeLog b/sim/aarch64/ChangeLog
index c02019f..9555a52 100644
--- a/sim/aarch64/ChangeLog
+++ b/sim/aarch64/ChangeLog
@@ -1,5 +1,9 @@
2021-05-17 Mike Frysinger <vapier@gentoo.org>
+ * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Delete.
+
+2021-05-17 Mike Frysinger <vapier@gentoo.org>
+
* sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Define.
(struct sim_state): Delete.
diff --git a/sim/aarch64/sim-main.h b/sim/aarch64/sim-main.h
index f1f9e5c..14d54cf 100644
--- a/sim/aarch64/sim-main.h
+++ b/sim/aarch64/sim-main.h
@@ -22,8 +22,6 @@
#ifndef _SIM_MAIN_H
#define _SIM_MAIN_H
-#define SIM_HAVE_COMMON_SIM_STATE
-
#include "sim-basics.h"
#include "sim-types.h"
#include "sim-base.h"
diff --git a/sim/arm/ChangeLog b/sim/arm/ChangeLog
index f8aa042..5725c3b 100644
--- a/sim/arm/ChangeLog
+++ b/sim/arm/ChangeLog
@@ -1,5 +1,9 @@
2021-05-17 Mike Frysinger <vapier@gentoo.org>
+ * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Delete.
+
+2021-05-17 Mike Frysinger <vapier@gentoo.org>
+
* sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Define.
(struct sim_state): Delete.
diff --git a/sim/arm/sim-main.h b/sim/arm/sim-main.h
index b471494..05135ae 100644
--- a/sim/arm/sim-main.h
+++ b/sim/arm/sim-main.h
@@ -19,8 +19,6 @@
#ifndef SIM_MAIN_H
#define SIM_MAIN_H
-#define SIM_HAVE_COMMON_SIM_STATE
-
#include "sim-basics.h"
#include "sim-base.h"
#include "bfd.h"
diff --git a/sim/avr/ChangeLog b/sim/avr/ChangeLog
index a93bd59..e7fbc5d 100644
--- a/sim/avr/ChangeLog
+++ b/sim/avr/ChangeLog
@@ -1,5 +1,9 @@
2021-05-17 Mike Frysinger <vapier@gentoo.org>
+ * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Delete.
+
+2021-05-17 Mike Frysinger <vapier@gentoo.org>
+
* interp.c (do_call): Change sd to avr_sim_state.
(step_once): Likewise.
(sim_open): Likewise.
diff --git a/sim/avr/sim-main.h b/sim/avr/sim-main.h
index 4f18882..42c3619 100644
--- a/sim/avr/sim-main.h
+++ b/sim/avr/sim-main.h
@@ -19,8 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef SIM_MAIN_H
#define SIM_MAIN_H
-#define SIM_HAVE_COMMON_SIM_STATE
-
#include "sim-basics.h"
#include "sim-base.h"
diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog
index d5c55e0..c4c3843 100644
--- a/sim/bfin/ChangeLog
+++ b/sim/bfin/ChangeLog
@@ -1,5 +1,9 @@
2021-05-17 Mike Frysinger <vapier@gentoo.org>
+ * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Delete.
+
+2021-05-17 Mike Frysinger <vapier@gentoo.org>
+
* interp.c (sim_open): Call sim_state_alloc_extra.
* sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Define.
(struct sim_state): Delete.
diff --git a/sim/bfin/sim-main.h b/sim/bfin/sim-main.h
index 855a178..18d0a00 100644
--- a/sim/bfin/sim-main.h
+++ b/sim/bfin/sim-main.h
@@ -21,8 +21,6 @@
#ifndef _BFIN_MAIN_SIM_H_
#define _BFIN_MAIN_SIM_H_
-#define SIM_HAVE_COMMON_SIM_STATE
-
#include "sim-basics.h"
#include "sim-signal.h"
#include "arch.h"
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 3a6c31a..76bf134 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,5 +1,42 @@
2021-05-17 Mike Frysinger <vapier@gentoo.org>
+ * sim-base.h (SIM_HAVE_COMMON_SIM_STATE): Delete.
+ (struct sim_state_base): Merge into ...
+ (struct sim_state): ... this.
+ (STATE_MY_NAME): Delete base.
+ (STATE_OPEN_KIND): Likewise.
+ (STATE_CALLBACK): Likewise.
+ (STATE_ENVIRONMENT): Likewise.
+ (STATE_CONFIG): Likewise.
+ (STATE_MODULES): Likewise.
+ (STATE_OPTIONS): Likewise.
+ (STATE_VERBOSE_P): Likewise.
+ (STATE_TRACE_DATA): Likewise.
+ (STATE_ARCHITECTURE): Likewise.
+ (STATE_TARGET): Likewise.
+ (STATE_PROG_ARGV): Likewise.
+ (STATE_PROG_BFD): Likewise.
+ (STATE_PROG_SYMS): Likewise.
+ (STATE_PROG_SYMS_COUNT): Likewise.
+ (STATE_TEXT_SECTION): Likewise.
+ (STATE_TEXT_START): Likewise.
+ (STATE_TEXT_END): Likewise.
+ (STATE_START_ADDR): Likewise.
+ (STATE_SCACHE_SIZE): Likewise.
+ (STATE_CORE): Likewise.
+ (STATE_MEMOPT): Likewise.
+ (STATE_EVENTS): Likewise.
+ (STATE_ENGINE): Likewise.
+ (STATE_WATCHPOINTS): Likewise.
+ (STATE_HW): Likewise.
+ (STATE_LOAD_AT_LMA_P): Likewise.
+ (SIM_MAGIC_NUMBER): Likewise.
+ (STATE_MAGIC): Likewise.
+ * sim-utils.c (sim_state_alloc_extra): Delete check for
+ SIM_HAVE_COMMON_SIM_STATE.
+
+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.
diff --git a/sim/common/sim-base.h b/sim/common/sim-base.h
index e552d94..7dbf294 100644
--- a/sim/common/sim-base.h
+++ b/sim/common/sim-base.h
@@ -90,147 +90,127 @@ typedef struct _sim_cpu sim_cpu;
#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. */
+struct sim_state {
+ /* All the cpus for this instance. */
+ sim_cpu *cpu[MAX_NR_PROCESSORS];
#if (WITH_SMP)
# define STATE_CPU(sd, n) ((sd)->cpu[n])
#else
# define STATE_CPU(sd, n) ((sd)->cpu[0])
#endif
-
-typedef struct {
-
/* Simulator's argv[0]. */
const char *my_name;
-#define STATE_MY_NAME(sd) ((sd)->base.my_name)
+#define STATE_MY_NAME(sd) ((sd)->my_name)
/* Who opened the simulator. */
SIM_OPEN_KIND open_kind;
-#define STATE_OPEN_KIND(sd) ((sd)->base.open_kind)
+#define STATE_OPEN_KIND(sd) ((sd)->open_kind)
/* The host callbacks. */
struct host_callback_struct *callback;
-#define STATE_CALLBACK(sd) ((sd)->base.callback)
+#define STATE_CALLBACK(sd) ((sd)->callback)
/* The type of simulation environment (user/operating). */
enum sim_environment environment;
-#define STATE_ENVIRONMENT(sd) ((sd)->base.environment)
+#define STATE_ENVIRONMENT(sd) ((sd)->environment)
#if 0 /* FIXME: Not ready yet. */
/* Stuff defined in sim-config.h. */
struct sim_config config;
-#define STATE_CONFIG(sd) ((sd)->base.config)
+#define STATE_CONFIG(sd) ((sd)->config)
#endif
/* List of installed module `init' handlers. */
struct module_list *modules;
-#define STATE_MODULES(sd) ((sd)->base.modules)
+#define STATE_MODULES(sd) ((sd)->modules)
/* Supported options. */
struct option_list *options;
-#define STATE_OPTIONS(sd) ((sd)->base.options)
+#define STATE_OPTIONS(sd) ((sd)->options)
/* Non-zero if -v specified. */
int verbose_p;
-#define STATE_VERBOSE_P(sd) ((sd)->base.verbose_p)
+#define STATE_VERBOSE_P(sd) ((sd)->verbose_p)
/* Non cpu-specific trace data. See sim-trace.h. */
TRACE_DATA trace_data;
-#define STATE_TRACE_DATA(sd) (& (sd)->base.trace_data)
+#define STATE_TRACE_DATA(sd) (& (sd)->trace_data)
/* If non NULL, the BFD architecture specified on the command line */
const struct bfd_arch_info *architecture;
-#define STATE_ARCHITECTURE(sd) ((sd)->base.architecture)
+#define STATE_ARCHITECTURE(sd) ((sd)->architecture)
/* If non NULL, the bfd target specified on the command line */
const char *target;
-#define STATE_TARGET(sd) ((sd)->base.target)
+#define STATE_TARGET(sd) ((sd)->target)
/* In standalone simulator, this is the program's arguments passed
on the command line. */
char **prog_argv;
-#define STATE_PROG_ARGV(sd) ((sd)->base.prog_argv)
+#define STATE_PROG_ARGV(sd) ((sd)->prog_argv)
/* The program's bfd. */
struct bfd *prog_bfd;
-#define STATE_PROG_BFD(sd) ((sd)->base.prog_bfd)
+#define STATE_PROG_BFD(sd) ((sd)->prog_bfd)
/* Symbol table for prog_bfd */
struct bfd_symbol **prog_syms;
-#define STATE_PROG_SYMS(sd) ((sd)->base.prog_syms)
+#define STATE_PROG_SYMS(sd) ((sd)->prog_syms)
/* Number of prog_syms symbols. */
long prog_syms_count;
-#define STATE_PROG_SYMS_COUNT(sd) ((sd)->base.prog_syms_count)
+#define STATE_PROG_SYMS_COUNT(sd) ((sd)->prog_syms_count)
/* The program's text section. */
struct bfd_section *text_section;
/* Starting and ending text section addresses from the bfd. */
bfd_vma text_start, text_end;
-#define STATE_TEXT_SECTION(sd) ((sd)->base.text_section)
-#define STATE_TEXT_START(sd) ((sd)->base.text_start)
-#define STATE_TEXT_END(sd) ((sd)->base.text_end)
+#define STATE_TEXT_SECTION(sd) ((sd)->text_section)
+#define STATE_TEXT_START(sd) ((sd)->text_start)
+#define STATE_TEXT_END(sd) ((sd)->text_end)
/* Start address, set when the program is loaded from the bfd. */
bfd_vma start_addr;
-#define STATE_START_ADDR(sd) ((sd)->base.start_addr)
+#define STATE_START_ADDR(sd) ((sd)->start_addr)
/* Size of the simulator's cache, if any.
This is not the target's cache. It is the cache the simulator uses
to process instructions. */
unsigned int scache_size;
-#define STATE_SCACHE_SIZE(sd) ((sd)->base.scache_size)
+#define STATE_SCACHE_SIZE(sd) ((sd)->scache_size)
/* core memory bus */
-#define STATE_CORE(sd) (&(sd)->base.core)
+#define STATE_CORE(sd) (&(sd)->core)
sim_core core;
/* Record of memory sections added via the memory-options interface. */
-#define STATE_MEMOPT(sd) ((sd)->base.memopt)
+#define STATE_MEMOPT(sd) ((sd)->memopt)
sim_memopt *memopt;
/* event handler */
-#define STATE_EVENTS(sd) (&(sd)->base.events)
+#define STATE_EVENTS(sd) (&(sd)->events)
sim_events events;
/* generic halt/resume engine */
sim_engine engine;
-#define STATE_ENGINE(sd) (&(sd)->base.engine)
+#define STATE_ENGINE(sd) (&(sd)->engine)
/* generic watchpoint support */
sim_watchpoints watchpoints;
-#define STATE_WATCHPOINTS(sd) (&(sd)->base.watchpoints)
+#define STATE_WATCHPOINTS(sd) (&(sd)->watchpoints)
#if WITH_HW
struct sim_hw *hw;
-#define STATE_HW(sd) ((sd)->base.hw)
+#define STATE_HW(sd) ((sd)->hw)
#endif
/* Should image loads be performed using the LMA or VMA? Older
simulators use the VMA while newer simulators prefer the LMA. */
int load_at_lma_p;
-#define STATE_LOAD_AT_LMA_P(SD) ((SD)->base.load_at_lma_p)
-
- /* Marker for those wanting to do sanity checks.
- This should remain the last member of this struct to help catch
- miscompilation errors. */
- int magic;
-#define SIM_MAGIC_NUMBER 0x4242
-#define STATE_MAGIC(sd) ((sd)->base.magic)
-} sim_state_base;
-
-#ifdef SIM_HAVE_COMMON_SIM_STATE
-/* TODO: Merge sim_state & sim_state_base. */
-struct sim_state {
- /* All the cpus for this instance. */
- sim_cpu *cpu[MAX_NR_PROCESSORS];
-
- /* All the common state. */
- sim_state_base base;
+#define STATE_LOAD_AT_LMA_P(SD) ((SD)->load_at_lma_p)
/* Pointer for sim target to store arbitrary state data. Normally the
target should define a struct and use it here. */
@@ -242,8 +222,14 @@ struct sim_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. */
+ int magic;
+#define SIM_MAGIC_NUMBER 0x4242
+#define STATE_MAGIC(sd) ((sd)->magic)
};
-#endif
/* Functions for allocating/freeing a sim_state. */
SIM_DESC sim_state_alloc_extra (SIM_OPEN_KIND kind, host_callback *callback,
diff --git a/sim/common/sim-utils.c b/sim/common/sim-utils.c
index 7a94375..380afd0 100644
--- a/sim/common/sim-utils.c
+++ b/sim/common/sim-utils.c
@@ -57,10 +57,8 @@ sim_state_alloc_extra (SIM_OPEN_KIND kind, host_callback *callback,
STATE_CALLBACK (sd) = callback;
STATE_OPEN_KIND (sd) = kind;
-#ifdef SIM_HAVE_COMMON_SIM_STATE
if (extra_bytes)
STATE_ARCH_DATA (sd) = zalloc (extra_bytes);
-#endif
#if 0
{
diff --git a/sim/cr16/ChangeLog b/sim/cr16/ChangeLog
index 84e0f8f..0a0fdcb 100644
--- a/sim/cr16/ChangeLog
+++ b/sim/cr16/ChangeLog
@@ -1,5 +1,9 @@
2021-05-17 Mike Frysinger <vapier@gentoo.org>
+ * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Delete.
+
+2021-05-17 Mike Frysinger <vapier@gentoo.org>
+
* sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Define.
(struct sim_state): Delete.
diff --git a/sim/cr16/sim-main.h b/sim/cr16/sim-main.h
index 7ea5b1d..8765b77 100644
--- a/sim/cr16/sim-main.h
+++ b/sim/cr16/sim-main.h
@@ -19,8 +19,6 @@
#ifndef SIM_MAIN_H
#define SIM_MAIN_H
-#define SIM_HAVE_COMMON_SIM_STATE
-
#include "sim-basics.h"
typedef long int word;
diff --git a/sim/d10v/ChangeLog b/sim/d10v/ChangeLog
index 421faeb..e45bd38 100644
--- a/sim/d10v/ChangeLog
+++ b/sim/d10v/ChangeLog
@@ -1,5 +1,9 @@
2021-05-17 Mike Frysinger <vapier@gentoo.org>
+ * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Delete.
+
+2021-05-17 Mike Frysinger <vapier@gentoo.org>
+
* sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Define.
(struct sim_state): Delete.
diff --git a/sim/d10v/sim-main.h b/sim/d10v/sim-main.h
index 83b34b0..6b5e668 100644
--- a/sim/d10v/sim-main.h
+++ b/sim/d10v/sim-main.h
@@ -19,8 +19,6 @@
#ifndef SIM_MAIN_H
#define SIM_MAIN_H
-#define SIM_HAVE_COMMON_SIM_STATE
-
#include "sim-basics.h"
typedef long int word;
diff --git a/sim/example-synacor/ChangeLog b/sim/example-synacor/ChangeLog
index e65ec65..d8c1704 100644
--- a/sim/example-synacor/ChangeLog
+++ b/sim/example-synacor/ChangeLog
@@ -1,5 +1,9 @@
2021-05-17 Mike Frysinger <vapier@gentoo.org>
+ * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Delete.
+
+2021-05-17 Mike Frysinger <vapier@gentoo.org>
+
* sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Define.
(struct sim_state): Delete.
diff --git a/sim/example-synacor/sim-main.h b/sim/example-synacor/sim-main.h
index 32b33b4..121d621 100644
--- a/sim/example-synacor/sim-main.h
+++ b/sim/example-synacor/sim-main.h
@@ -21,8 +21,6 @@
#ifndef SIM_MAIN_H
#define SIM_MAIN_H
-#define SIM_HAVE_COMMON_SIM_STATE
-
#include "sim-basics.h"
#include "sim-base.h"
diff --git a/sim/ft32/ChangeLog b/sim/ft32/ChangeLog
index 256058a..ad8c8ae 100644
--- a/sim/ft32/ChangeLog
+++ b/sim/ft32/ChangeLog
@@ -1,5 +1,9 @@
2021-05-17 Mike Frysinger <vapier@gentoo.org>
+ * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Delete.
+
+2021-05-17 Mike Frysinger <vapier@gentoo.org>
+
* sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Define.
(struct sim_state): Delete.
diff --git a/sim/ft32/sim-main.h b/sim/ft32/sim-main.h
index 8cf384c..6eb2571 100644
--- a/sim/ft32/sim-main.h
+++ b/sim/ft32/sim-main.h
@@ -21,8 +21,6 @@
#ifndef SIM_MAIN_H
#define SIM_MAIN_H
-#define SIM_HAVE_COMMON_SIM_STATE
-
#include "sim-basics.h"
#include "sim-base.h"
#include "bfd.h"
diff --git a/sim/h8300/ChangeLog b/sim/h8300/ChangeLog
index 8ddbb54..b6d91c8 100644
--- a/sim/h8300/ChangeLog
+++ b/sim/h8300/ChangeLog
@@ -1,5 +1,9 @@
2021-05-17 Mike Frysinger <vapier@gentoo.org>
+ * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Delete.
+
+2021-05-17 Mike Frysinger <vapier@gentoo.org>
+
* compile.c (h8_get_state): Change sd to H8300_SIM_STATE.
(h8_set_state): Likewise.
(h8_get_stats): Likewise.
diff --git a/sim/h8300/sim-main.h b/sim/h8300/sim-main.h
index 57ff307..a0aa9ef 100644
--- a/sim/h8300/sim-main.h
+++ b/sim/h8300/sim-main.h
@@ -5,8 +5,6 @@
#ifndef SIM_MAIN_H
#define SIM_MAIN_H
-#define SIM_HAVE_COMMON_SIM_STATE
-
#define DEBUG
/* These define the size of main memory for the simulator.
diff --git a/sim/m68hc11/ChangeLog b/sim/m68hc11/ChangeLog
index c8d1177..e6db2c3 100644
--- a/sim/m68hc11/ChangeLog
+++ b/sim/m68hc11/ChangeLog
@@ -1,5 +1,9 @@
2021-05-17 Mike Frysinger <vapier@gentoo.org>
+ * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Delete.
+
+2021-05-17 Mike Frysinger <vapier@gentoo.org>
+
* sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Define.
(struct sim_state): Delete.
diff --git a/sim/m68hc11/sim-main.h b/sim/m68hc11/sim-main.h
index d72ede1..955c69f 100644
--- a/sim/m68hc11/sim-main.h
+++ b/sim/m68hc11/sim-main.h
@@ -20,8 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef _SIM_MAIN_H
#define _SIM_MAIN_H
-#define SIM_HAVE_COMMON_SIM_STATE
-
#include "sim-basics.h"
#include "sim-signal.h"
#include "sim-base.h"
diff --git a/sim/mcore/ChangeLog b/sim/mcore/ChangeLog
index 7a5453f..5680fc8 100644
--- a/sim/mcore/ChangeLog
+++ b/sim/mcore/ChangeLog
@@ -1,5 +1,9 @@
2021-05-17 Mike Frysinger <vapier@gentoo.org>
+ * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Delete.
+
+2021-05-17 Mike Frysinger <vapier@gentoo.org>
+
* sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Define.
(struct sim_state): Delete.
diff --git a/sim/mcore/sim-main.h b/sim/mcore/sim-main.h
index bfa28d0..2b5269a 100644
--- a/sim/mcore/sim-main.h
+++ b/sim/mcore/sim-main.h
@@ -19,8 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef SIM_MAIN_H
#define SIM_MAIN_H
-#define SIM_HAVE_COMMON_SIM_STATE
-
#include "sim-basics.h"
typedef long int word;
diff --git a/sim/microblaze/ChangeLog b/sim/microblaze/ChangeLog
index f583623..5cd004d 100644
--- a/sim/microblaze/ChangeLog
+++ b/sim/microblaze/ChangeLog
@@ -1,5 +1,9 @@
2021-05-17 Mike Frysinger <vapier@gentoo.org>
+ * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Delete.
+
+2021-05-17 Mike Frysinger <vapier@gentoo.org>
+
* sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Define.
(struct sim_state): Delete.
diff --git a/sim/microblaze/sim-main.h b/sim/microblaze/sim-main.h
index d69d814..1b63746 100644
--- a/sim/microblaze/sim-main.h
+++ b/sim/microblaze/sim-main.h
@@ -18,8 +18,6 @@
#ifndef MICROBLAZE_SIM_MAIN
#define MICROBLAZE_SIM_MAIN
-#define SIM_HAVE_COMMON_SIM_STATE
-
#include "microblaze.h"
#include "sim-basics.h"
#include "sim-base.h"
diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog
index ca8a1fb..85ce1ac 100644
--- a/sim/mips/ChangeLog
+++ b/sim/mips/ChangeLog
@@ -1,5 +1,9 @@
2021-05-17 Mike Frysinger <vapier@gentoo.org>
+ * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Delete.
+
+2021-05-17 Mike Frysinger <vapier@gentoo.org>
+
* interp.c (sim_open): Switch to sim_state_alloc_extra.
* micromips.igen: Change SD to mips_sim_state.
* micromipsrun.c (sim_engine_run): Likewise.
diff --git a/sim/mips/sim-main.h b/sim/mips/sim-main.h
index 3c7ba27..8c9abfa 100644
--- a/sim/mips/sim-main.h
+++ b/sim/mips/sim-main.h
@@ -20,8 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef SIM_MAIN_H
#define SIM_MAIN_H
-#define SIM_HAVE_COMMON_SIM_STATE
-
/* MIPS uses an unusual format for floating point quiet NaNs. */
#define SIM_QUIET_NAN_NEGATED
diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog
index 75a447d..dbb5b6d 100644
--- a/sim/mn10300/ChangeLog
+++ b/sim/mn10300/ChangeLog
@@ -1,5 +1,9 @@
2021-05-17 Mike Frysinger <vapier@gentoo.org>
+ * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Delete.
+
+2021-05-17 Mike Frysinger <vapier@gentoo.org>
+
* sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Define.
(struct sim_state): Delete.
diff --git a/sim/mn10300/sim-main.h b/sim/mn10300/sim-main.h
index 5bf068b..e184613 100644
--- a/sim/mn10300/sim-main.h
+++ b/sim/mn10300/sim-main.h
@@ -22,8 +22,6 @@
#ifndef SIM_MAIN_H
#define SIM_MAIN_H
-#define SIM_HAVE_COMMON_SIM_STATE
-
#define SIM_ENGINE_HALT_HOOK(SD,LAST_CPU,CIA) 0 /* disable this hook */
#include "sim-basics.h"
diff --git a/sim/moxie/ChangeLog b/sim/moxie/ChangeLog
index a8a46a6..d2e07c5 100644
--- a/sim/moxie/ChangeLog
+++ b/sim/moxie/ChangeLog
@@ -1,5 +1,9 @@
2021-05-17 Mike Frysinger <vapier@gentoo.org>
+ * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Delete.
+
+2021-05-17 Mike Frysinger <vapier@gentoo.org>
+
* sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Define.
(struct sim_state): Delete.
diff --git a/sim/moxie/sim-main.h b/sim/moxie/sim-main.h
index 19b9475..9a5d33a 100644
--- a/sim/moxie/sim-main.h
+++ b/sim/moxie/sim-main.h
@@ -20,8 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef SIM_MAIN_H
#define SIM_MAIN_H
-#define SIM_HAVE_COMMON_SIM_STATE
-
#include "sim-basics.h"
#include "sim-base.h"
#include "bfd.h"
diff --git a/sim/msp430/ChangeLog b/sim/msp430/ChangeLog
index 1ea283c..d206981 100644
--- a/sim/msp430/ChangeLog
+++ b/sim/msp430/ChangeLog
@@ -1,5 +1,9 @@
2021-05-17 Mike Frysinger <vapier@gentoo.org>
+ * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Delete.
+
+2021-05-17 Mike Frysinger <vapier@gentoo.org>
+
* sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Define.
(struct sim_state): Delete.
diff --git a/sim/msp430/sim-main.h b/sim/msp430/sim-main.h
index f98712c..fdfa5d0 100644
--- a/sim/msp430/sim-main.h
+++ b/sim/msp430/sim-main.h
@@ -21,8 +21,6 @@
#ifndef _MSP430_MAIN_SIM_H_
#define _MSP430_MAIN_SIM_H_
-#define SIM_HAVE_COMMON_SIM_STATE
-
#include "sim-basics.h"
#include "sim-signal.h"
#include "msp430-sim.h"
diff --git a/sim/pru/ChangeLog b/sim/pru/ChangeLog
index 27a0f9e..946ce04 100644
--- a/sim/pru/ChangeLog
+++ b/sim/pru/ChangeLog
@@ -1,5 +1,9 @@
2021-05-17 Mike Frysinger <vapier@gentoo.org>
+ * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Delete.
+
+2021-05-17 Mike Frysinger <vapier@gentoo.org>
+
* sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Define.
(struct sim_state): Delete.
diff --git a/sim/pru/sim-main.h b/sim/pru/sim-main.h
index 49c54f4..b7af230 100644
--- a/sim/pru/sim-main.h
+++ b/sim/pru/sim-main.h
@@ -19,8 +19,6 @@
#ifndef PRU_SIM_MAIN
#define PRU_SIM_MAIN
-#define SIM_HAVE_COMMON_SIM_STATE
-
#include <stdint.h>
#include <stddef.h>
#include "pru.h"
diff --git a/sim/riscv/ChangeLog b/sim/riscv/ChangeLog
index e7cd0a3..55fd61e 100644
--- a/sim/riscv/ChangeLog
+++ b/sim/riscv/ChangeLog
@@ -1,5 +1,9 @@
2021-05-17 Mike Frysinger <vapier@gentoo.org>
+ * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Delete.
+
+2021-05-17 Mike Frysinger <vapier@gentoo.org>
+
* interp.c (sim_open): Call sim_state_alloc_extra.
* sim-main.c (execute_a): Change sd to riscv_sim_state.
* sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Define.
diff --git a/sim/riscv/sim-main.h b/sim/riscv/sim-main.h
index fd09539..1088e5b 100644
--- a/sim/riscv/sim-main.h
+++ b/sim/riscv/sim-main.h
@@ -21,8 +21,6 @@
#ifndef SIM_MAIN_H
#define SIM_MAIN_H
-#define SIM_HAVE_COMMON_SIM_STATE
-
#include "sim-basics.h"
#include "machs.h"
#include "sim-base.h"
diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog
index b031cd3..de3cdef 100644
--- a/sim/sh/ChangeLog
+++ b/sim/sh/ChangeLog
@@ -1,5 +1,9 @@
2021-05-17 Mike Frysinger <vapier@gentoo.org>
+ * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Delete.
+
+2021-05-17 Mike Frysinger <vapier@gentoo.org>
+
* sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Define.
(struct sim_state): Delete.
diff --git a/sim/sh/sim-main.h b/sim/sh/sim-main.h
index 58c1436..9453e62 100644
--- a/sim/sh/sim-main.h
+++ b/sim/sh/sim-main.h
@@ -19,8 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef SIM_MAIN_H
#define SIM_MAIN_H
-#define SIM_HAVE_COMMON_SIM_STATE
-
#include "sim-basics.h"
#include "sim-base.h"
diff --git a/sim/v850/ChangeLog b/sim/v850/ChangeLog
index 82491e7..02e6bbd 100644
--- a/sim/v850/ChangeLog
+++ b/sim/v850/ChangeLog
@@ -1,5 +1,9 @@
2021-05-17 Mike Frysinger <vapier@gentoo.org>
+ * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Delete.
+
+2021-05-17 Mike Frysinger <vapier@gentoo.org>
+
* sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Define.
(struct sim_state): Delete.
diff --git a/sim/v850/sim-main.h b/sim/v850/sim-main.h
index 6dc5c44..792af56 100644
--- a/sim/v850/sim-main.h
+++ b/sim/v850/sim-main.h
@@ -1,8 +1,6 @@
#ifndef SIM_MAIN_H
#define SIM_MAIN_H
-#define SIM_HAVE_COMMON_SIM_STATE
-
/* The v850 has 32bit words, numbered 31 (MSB) to 0 (LSB) */
#define WITH_TARGET_WORD_MSB 31