aboutsummaryrefslogtreecommitdiff
path: root/sim/lm32
diff options
context:
space:
mode:
Diffstat (limited to 'sim/lm32')
-rw-r--r--sim/lm32/ChangeLog7
-rw-r--r--sim/lm32/arch.c2
-rw-r--r--sim/lm32/sim-if.c3
3 files changed, 11 insertions, 1 deletions
diff --git a/sim/lm32/ChangeLog b/sim/lm32/ChangeLog
index 689eb64..6d2d238 100644
--- a/sim/lm32/ChangeLog
+++ b/sim/lm32/ChangeLog
@@ -1,3 +1,10 @@
+2021-06-30 Mike Frysinger <vapier@gentoo.org>
+
+ * arch.c (sim_machs): Rename to ...
+ (lm32_sim_machs): ... this.
+ * sim-if.c (lm32_sim_machs): New decl.
+ (sim_open): Set STATE_MACH.
+
2021-06-29 Mike Frysinger <vapier@gentoo.org>
* arch.c (sim_machs): Mark const.
diff --git a/sim/lm32/arch.c b/sim/lm32/arch.c
index 72fe4b4..4c48514 100644
--- a/sim/lm32/arch.c
+++ b/sim/lm32/arch.c
@@ -24,7 +24,7 @@ This file is part of the GNU simulators.
#include "sim-main.h"
#include "bfd.h"
-const SIM_MACH * const sim_machs[] =
+const SIM_MACH * const lm32_sim_machs[] =
{
#ifdef HAVE_CPU_LM32BF
& lm32_mach,
diff --git a/sim/lm32/sim-if.c b/sim/lm32/sim-if.c
index 0142868..abb9ad7 100644
--- a/sim/lm32/sim-if.c
+++ b/sim/lm32/sim-if.c
@@ -80,6 +80,8 @@ find_limit (SIM_DESC sd)
return (addr + 65536) & ~(0xffffUL);
}
+extern const SIM_MACH * const lm32_sim_machs[];
+
/* Create an instance of the simulator. */
SIM_DESC
@@ -92,6 +94,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, struct bfd *abfd,
unsigned long base, limit;
/* Set default options before parsing user options. */
+ STATE_MACHS (sd) = lm32_sim_machs;
current_alignment = STRICT_ALIGNMENT;
current_target_byte_order = BFD_ENDIAN_BIG;