aboutsummaryrefslogtreecommitdiff
path: root/sim/m68hc11/sim-main.h
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-04-13 02:07:23 -0400
committerMike Frysinger <vapier@gentoo.org>2015-04-13 02:07:23 -0400
commitbea3f671c5734eb96a02055fbaa0c938ad535b66 (patch)
tree4f2e6335b998ce6b5daa088bbc8d8fc91650f1b9 /sim/m68hc11/sim-main.h
parent8ac57fbde478b8e8fb0ba169f620d713be319260 (diff)
downloadgdb-bea3f671c5734eb96a02055fbaa0c938ad535b66.zip
gdb-bea3f671c5734eb96a02055fbaa0c938ad535b66.tar.gz
gdb-bea3f671c5734eb96a02055fbaa0c938ad535b66.tar.bz2
sim: m68hc11: convert to sim-cpu
Make cpu allocation fully dynamic so we can leverage the common sim-cpu and its APIs.
Diffstat (limited to 'sim/m68hc11/sim-main.h')
-rw-r--r--sim/m68hc11/sim-main.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/sim/m68hc11/sim-main.h b/sim/m68hc11/sim-main.h
index 3973159..be3fc3d 100644
--- a/sim/m68hc11/sim-main.h
+++ b/sim/m68hc11/sim-main.h
@@ -28,6 +28,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
typedef address_word sim_cia;
+typedef struct _sim_cpu SIM_CPU;
+
#include "sim-signal.h"
#include "sim-base.h"
@@ -576,13 +578,13 @@ extern void m68hc11cpu_set_port (struct hw *me, sim_cpu *cpu,
#define CIA_SET(CPU,VAL) (cpu_set_pc ((CPU), (VAL)))
#if (WITH_SMP)
-#define STATE_CPU(sd,n) (&(sd)->cpu[n])
+#define STATE_CPU(sd,n) ((sd)->cpu[n])
#else
-#define STATE_CPU(sd,n) (&(sd)->cpu[0])
+#define STATE_CPU(sd,n) ((sd)->cpu[0])
#endif
struct sim_state {
- sim_cpu cpu[MAX_NR_PROCESSORS];
+ sim_cpu *cpu[MAX_NR_PROCESSORS];
device *devices;
sim_state_base base;
};