aboutsummaryrefslogtreecommitdiff
path: root/sim/frv/sim-if.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-06-28 21:42:56 -0400
committerMike Frysinger <vapier@gentoo.org>2021-06-30 01:52:51 -0400
commit1c636da093f335cd57e7fca0fc25ae9f9e849264 (patch)
treee33d33c678ae988d2ad31027bb2b23c8f009e34e /sim/frv/sim-if.c
parentf8261de1b22cc1a72ae18a2300df8b2cf7f027db (diff)
downloadfsf-binutils-gdb-1c636da093f335cd57e7fca0fc25ae9f9e849264.zip
fsf-binutils-gdb-1c636da093f335cd57e7fca0fc25ae9f9e849264.tar.gz
fsf-binutils-gdb-1c636da093f335cd57e7fca0fc25ae9f9e849264.tar.bz2
sim: namespace sim_machs
We want to do a single build with all arches in one binary which means we need to namespace sim_machs on a per-arch basis. Move it from a global variable to the sim description structure so it can be setup at runtime. Changing the SIM_MODEL->num from an enum to an int is unfortunate, but we specifically don't want to maintain a centralized list anymore, and this was never used directly in common code, just passed to per-arch callbacks.
Diffstat (limited to 'sim/frv/sim-if.c')
-rw-r--r--sim/frv/sim-if.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sim/frv/sim-if.c b/sim/frv/sim-if.c
index 530a8dd..82f4bd8 100644
--- a/sim/frv/sim-if.c
+++ b/sim/frv/sim-if.c
@@ -42,6 +42,8 @@ free_state (SIM_DESC sd)
sim_state_free (sd);
}
+extern const SIM_MACH * const frv_sim_machs[];
+
/* Create an instance of the simulator. */
SIM_DESC
@@ -54,6 +56,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, bfd *abfd,
SIM_DESC sd = sim_state_alloc (kind, callback);
/* Set default options before parsing user options. */
+ STATE_MACHS (sd) = frv_sim_machs;
current_alignment = STRICT_ALIGNMENT;
current_target_byte_order = BFD_ENDIAN_BIG;