From f95f4ed2c4680fea68399691481b277ece11570e Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 15 Apr 2015 01:22:34 -0400 Subject: 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. --- sim/m32r/ChangeLog | 5 +++++ sim/m32r/sim-main.h | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'sim/m32r') diff --git a/sim/m32r/ChangeLog b/sim/m32r/ChangeLog index 2dcd3a0..c8a285c 100644 --- a/sim/m32r/ChangeLog +++ b/sim/m32r/ChangeLog @@ -1,3 +1,8 @@ +2015-04-15 Mike Frysinger + + * sim-main.h (struct sim_state): Change cpu to an array of pointers. + (STATE_CPU): Handle WITH_SMP. + 2015-04-13 Mike Frysinger * configure: Regenerate. diff --git a/sim/m32r/sim-main.h b/sim/m32r/sim-main.h index 2cbb40b..96c1ec1 100644 --- a/sim/m32r/sim-main.h +++ b/sim/m32r/sim-main.h @@ -68,8 +68,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; -- cgit v1.1