aboutsummaryrefslogtreecommitdiff
path: root/sim/frv
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-04-15 01:22:34 -0400
committerMike Frysinger <vapier@gentoo.org>2015-04-15 01:25:32 -0400
commitf95f4ed2c4680fea68399691481b277ece11570e (patch)
tree748d1545cd42a16b83339b64bd02327252079e85 /sim/frv
parent0ce398f106dac65c3a1d2f7d254213fa652af089 (diff)
downloadgdb-f95f4ed2c4680fea68399691481b277ece11570e.zip
gdb-f95f4ed2c4680fea68399691481b277ece11570e.tar.gz
gdb-f95f4ed2c4680fea68399691481b277ece11570e.tar.bz2
sim: cris/frv/h8300/iq2000/lm32/m32r/sh64: standardize cpu state
This sets up the sim_state structure and the cpu member to match what we do in most other sims, and what the common code suggests. This is a step to unifying on the sim-cpu.o object.
Diffstat (limited to 'sim/frv')
-rw-r--r--sim/frv/ChangeLog5
-rw-r--r--sim/frv/sim-main.h8
2 files changed, 11 insertions, 2 deletions
diff --git a/sim/frv/ChangeLog b/sim/frv/ChangeLog
index 9580c56..8e7e995 100644
--- a/sim/frv/ChangeLog
+++ b/sim/frv/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-15 Mike Frysinger <vapier@gentoo.org>
+
+ * sim-main.h (struct sim_state): Change cpu to an array of pointers.
+ (STATE_CPU): Handle WITH_SMP.
+
2015-04-13 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
diff --git a/sim/frv/sim-main.h b/sim/frv/sim-main.h
index 7528f6a..e7dc1a2 100644
--- a/sim/frv/sim-main.h
+++ b/sim/frv/sim-main.h
@@ -118,8 +118,12 @@ struct _sim_cpu {
/* The sim_state struct. */
struct sim_state {
- sim_cpu *cpu;
-#define STATE_CPU(sd, n) (/*&*/ (sd)->cpu)
+ 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
CGEN_STATE cgen_state;