aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-04-15 02:13:23 -0400
committerMike Frysinger <vapier@gentoo.org>2015-04-15 02:19:52 -0400
commit78e9aa70febc3985a2c88dbc0c7a87d214231c3d (patch)
tree1a0eb199746ae7edea7336a3a60b53daa42a7275
parentf95f4ed2c4680fea68399691481b277ece11570e (diff)
sim: unify sim-cpu usage
Now that all the targets are utilizing CPU_PC_{FETCH,STORE}, and the cpu state is multicore, and the STATE_CPU defines match, we can move it all to the common code.
-rw-r--r--sim/arm/ChangeLog5
-rw-r--r--sim/arm/Makefile.in1
-rw-r--r--sim/arm/sim-main.h5
-rw-r--r--sim/avr/ChangeLog5
-rw-r--r--sim/avr/Makefile.in1
-rw-r--r--sim/avr/sim-main.h5
-rw-r--r--sim/bfin/ChangeLog5
-rw-r--r--sim/bfin/Makefile.in1
-rw-r--r--sim/bfin/sim-main.h6
-rw-r--r--sim/common/ChangeLog5
-rw-r--r--sim/common/Make-common.in1
-rw-r--r--sim/common/sim-base.h14
-rw-r--r--sim/cr16/ChangeLog5
-rw-r--r--sim/cr16/Makefile.in1
-rw-r--r--sim/cr16/sim-main.h5
-rw-r--r--sim/cris/ChangeLog5
-rw-r--r--sim/cris/Makefile.in1
-rw-r--r--sim/cris/sim-main.h5
-rw-r--r--sim/d10v/ChangeLog5
-rw-r--r--sim/d10v/Makefile.in1
-rw-r--r--sim/d10v/sim-main.h5
-rw-r--r--sim/frv/ChangeLog5
-rw-r--r--sim/frv/Makefile.in1
-rw-r--r--sim/frv/sim-main.h5
-rw-r--r--sim/ft32/ChangeLog5
-rw-r--r--sim/ft32/Makefile.in1
-rw-r--r--sim/ft32/sim-main.h5
-rw-r--r--sim/h8300/ChangeLog5
-rw-r--r--sim/h8300/Makefile.in1
-rw-r--r--sim/h8300/sim-main.h5
-rw-r--r--sim/iq2000/ChangeLog5
-rw-r--r--sim/iq2000/Makefile.in1
-rw-r--r--sim/iq2000/sim-main.h5
-rw-r--r--sim/lm32/ChangeLog5
-rw-r--r--sim/lm32/Makefile.in1
-rw-r--r--sim/lm32/sim-main.h5
-rw-r--r--sim/m32r/ChangeLog5
-rw-r--r--sim/m32r/Makefile.in1
-rw-r--r--sim/m32r/sim-main.h5
-rw-r--r--sim/m68hc11/ChangeLog5
-rw-r--r--sim/m68hc11/Makefile.in1
-rw-r--r--sim/m68hc11/sim-main.h6
-rw-r--r--sim/mcore/ChangeLog5
-rw-r--r--sim/mcore/Makefile.in1
-rw-r--r--sim/mcore/sim-main.h5
-rw-r--r--sim/microblaze/ChangeLog5
-rw-r--r--sim/microblaze/Makefile.in1
-rw-r--r--sim/microblaze/sim-main.h5
-rw-r--r--sim/mips/ChangeLog5
-rw-r--r--sim/mips/Makefile.in1
-rw-r--r--sim/mips/sim-main.h5
-rw-r--r--sim/mn10300/ChangeLog5
-rw-r--r--sim/mn10300/Makefile.in1
-rw-r--r--sim/mn10300/sim-main.h5
-rw-r--r--sim/moxie/ChangeLog5
-rw-r--r--sim/moxie/Makefile.in1
-rw-r--r--sim/moxie/sim-main.h5
-rw-r--r--sim/msp430/ChangeLog5
-rw-r--r--sim/msp430/Makefile.in1
-rw-r--r--sim/msp430/sim-main.h6
-rw-r--r--sim/sh/ChangeLog5
-rw-r--r--sim/sh/Makefile.in1
-rw-r--r--sim/sh/sim-main.h5
-rw-r--r--sim/sh64/ChangeLog5
-rw-r--r--sim/sh64/Makefile.in1
-rw-r--r--sim/sh64/sim-main.h5
-rw-r--r--sim/v850/ChangeLog5
-rw-r--r--sim/v850/Makefile.in1
-rw-r--r--sim/v850/sim-main.h5
69 files changed, 126 insertions, 139 deletions
diff --git a/sim/arm/ChangeLog b/sim/arm/ChangeLog
index 4078d71f1a..c98903d42b 100644
--- a/sim/arm/ChangeLog
+++ b/sim/arm/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-15 Mike Frysinger <vapier@gentoo.org>
+
+ * Makefile.in (SIM_OBJS): Delete sim-cpu.o.
+ * sim-main.h (STATE_CPU): Delete.
+
2015-04-13 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
diff --git a/sim/arm/Makefile.in b/sim/arm/Makefile.in
index 5c3772308d..745b62a8e7 100644
--- a/sim/arm/Makefile.in
+++ b/sim/arm/Makefile.in
@@ -22,7 +22,6 @@ SIM_EXTRA_CFLAGS = -DMODET
SIM_OBJS = \
wrapper.o \
$(SIM_NEW_COMMON_OBJS) \
- sim-cpu.o \
sim-hload.o \
armemu26.o armemu32.o arminit.o armos.o armsupp.o \
armvirt.o bag.o thumbemu.o \
diff --git a/sim/arm/sim-main.h b/sim/arm/sim-main.h
index d020972864..8b64287a22 100644
--- a/sim/arm/sim-main.h
+++ b/sim/arm/sim-main.h
@@ -44,11 +44,6 @@ struct _sim_cpu {
struct sim_state {
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
sim_state_base base;
};
diff --git a/sim/avr/ChangeLog b/sim/avr/ChangeLog
index d8b2a29c11..0dd4faf6bc 100644
--- a/sim/avr/ChangeLog
+++ b/sim/avr/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-15 Mike Frysinger <vapier@gentoo.org>
+
+ * Makefile.in (SIM_OBJS): Delete sim-cpu.o.
+ * sim-main.h (STATE_CPU): Delete.
+
2015-04-13 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
diff --git a/sim/avr/Makefile.in b/sim/avr/Makefile.in
index d7b77d015c..80a1230e9d 100644
--- a/sim/avr/Makefile.in
+++ b/sim/avr/Makefile.in
@@ -19,7 +19,6 @@
SIM_OBJS = \
$(SIM_NEW_COMMON_OBJS) \
interp.o \
- sim-cpu.o \
sim-hload.o \
sim-reason.o \
sim-resume.o \
diff --git a/sim/avr/sim-main.h b/sim/avr/sim-main.h
index 025eb151ab..fc30e11737 100644
--- a/sim/avr/sim-main.h
+++ b/sim/avr/sim-main.h
@@ -39,11 +39,6 @@ struct _sim_cpu {
struct sim_state {
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
sim_state_base base;
};
diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog
index cd73580045..db379c333d 100644
--- a/sim/bfin/ChangeLog
+++ b/sim/bfin/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-15 Mike Frysinger <vapier@gentoo.org>
+
+ * Makefile.in (SIM_OBJS): Delete sim-cpu.o.
+ * sim-main.h (STATE_CPU): Delete.
+
2015-04-13 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
diff --git a/sim/bfin/Makefile.in b/sim/bfin/Makefile.in
index 38531a9e69..dc42339583 100644
--- a/sim/bfin/Makefile.in
+++ b/sim/bfin/Makefile.in
@@ -27,7 +27,6 @@ SIM_OBJS = \
gui.o \
interp.o \
machs.o \
- sim-cpu.o \
sim-hload.o \
sim-model.o \
sim-reason.o \
diff --git a/sim/bfin/sim-main.h b/sim/bfin/sim-main.h
index 1b58e75a91..f8c2ba2a3d 100644
--- a/sim/bfin/sim-main.h
+++ b/sim/bfin/sim-main.h
@@ -46,11 +46,7 @@ struct _sim_cpu {
struct sim_state {
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
+
/* ... simulator specific members ... */
struct bfin_board_data board;
#define STATE_BOARD_DATA(sd) (&(sd)->board)
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 5c0667b8a1..316771d331 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-15 Mike Frysinger <vapier@gentoo.org>
+
+ * Makefile.in (SIM_NEW_COMMON_OBJS): Add sim-cpu.o.
+ * sim-main.h (STATE_CPU): Remove from comment and define.
+
2015-04-13 Mike Frysinger <vapier@gentoo.org>
* acinclude.m4 (ACX_PKGVERSION): Change GDB to SIM.
diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in
index d42fea6103..2d1bb8a1a4 100644
--- a/sim/common/Make-common.in
+++ b/sim/common/Make-common.in
@@ -176,6 +176,7 @@ SIM_NEW_COMMON_OBJS = \
sim-command.o \
sim-config.o \
sim-core.o \
+ sim-cpu.o \
sim-endian.o \
sim-engine.o \
sim-events.o \
diff --git a/sim/common/sim-base.h b/sim/common/sim-base.h
index f7a33cd9f4..0dae541094 100644
--- a/sim/common/sim-base.h
+++ b/sim/common/sim-base.h
@@ -44,11 +44,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
struct sim_state {
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
... simulator specific members ...
sim_state_base base;
};
@@ -116,6 +111,15 @@ extern struct sim_state *current_state;
#endif
+/* We require all sims to dynamically allocate cpus. See comment up top about
+ struct sim_state. */
+#if (WITH_SMP)
+# define STATE_CPU(sd, n) ((sd)->cpu[n])
+#else
+# define STATE_CPU(sd, n) ((sd)->cpu[0])
+#endif
+
+
typedef struct {
/* Simulator's argv[0]. */
diff --git a/sim/cr16/ChangeLog b/sim/cr16/ChangeLog
index 272d7ca7e5..4aa6429641 100644
--- a/sim/cr16/ChangeLog
+++ b/sim/cr16/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-15 Mike Frysinger <vapier@gentoo.org>
+
+ * Makefile.in (SIM_OBJS): Delete sim-cpu.o.
+ * sim-main.h (STATE_CPU): Delete.
+
2015-04-13 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
diff --git a/sim/cr16/Makefile.in b/sim/cr16/Makefile.in
index 3918cedbab..5d1632d973 100644
--- a/sim/cr16/Makefile.in
+++ b/sim/cr16/Makefile.in
@@ -19,7 +19,6 @@
SIM_OBJS = \
$(SIM_NEW_COMMON_OBJS) \
- sim-cpu.o \
sim-hload.o \
interp.o \
table.o \
diff --git a/sim/cr16/sim-main.h b/sim/cr16/sim-main.h
index 2be0e2390d..ec94a82920 100644
--- a/sim/cr16/sim-main.h
+++ b/sim/cr16/sim-main.h
@@ -43,11 +43,6 @@ struct _sim_cpu {
struct sim_state {
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
sim_state_base base;
};
diff --git a/sim/cris/ChangeLog b/sim/cris/ChangeLog
index b1ac59136f..89275296b3 100644
--- a/sim/cris/ChangeLog
+++ b/sim/cris/ChangeLog
@@ -1,5 +1,10 @@
2015-04-15 Mike Frysinger <vapier@gentoo.org>
+ * Makefile.in (SIM_OBJS): Delete sim-cpu.o.
+ * sim-main.h (STATE_CPU): Delete.
+
+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.
diff --git a/sim/cris/Makefile.in b/sim/cris/Makefile.in
index 5459c0e7a2..945eaa60b7 100644
--- a/sim/cris/Makefile.in
+++ b/sim/cris/Makefile.in
@@ -24,7 +24,6 @@ CRISV32F_OBJS = crisv32f.o cpuv32.o decodev32.o modelv32.o mloopv32f.o
SIM_OBJS = \
$(SIM_NEW_COMMON_OBJS) \
- sim-cpu.o \
sim-model.o \
sim-reg.o \
cgen-utils.o cgen-trace.o cgen-scache.o \
diff --git a/sim/cris/sim-main.h b/sim/cris/sim-main.h
index 5ae292e998..df6c5cf81e 100644
--- a/sim/cris/sim-main.h
+++ b/sim/cris/sim-main.h
@@ -226,11 +226,6 @@ struct _sim_cpu {
struct sim_state {
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;
diff --git a/sim/d10v/ChangeLog b/sim/d10v/ChangeLog
index 331f359f7d..4ce1df84aa 100644
--- a/sim/d10v/ChangeLog
+++ b/sim/d10v/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-15 Mike Frysinger <vapier@gentoo.org>
+
+ * Makefile.in (SIM_OBJS): Delete sim-cpu.o.
+ * sim-main.h (STATE_CPU): Delete.
+
2015-04-13 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
diff --git a/sim/d10v/Makefile.in b/sim/d10v/Makefile.in
index 167e76bd8b..27b0008d12 100644
--- a/sim/d10v/Makefile.in
+++ b/sim/d10v/Makefile.in
@@ -20,7 +20,6 @@
SIM_OBJS = \
interp.o \
$(SIM_NEW_COMMON_OBJS) \
- sim-cpu.o \
sim-hload.o \
table.o \
simops.o \
diff --git a/sim/d10v/sim-main.h b/sim/d10v/sim-main.h
index ac32f29b4d..c83c78c8ed 100644
--- a/sim/d10v/sim-main.h
+++ b/sim/d10v/sim-main.h
@@ -43,11 +43,6 @@ struct _sim_cpu {
struct sim_state {
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
sim_state_base base;
};
diff --git a/sim/frv/ChangeLog b/sim/frv/ChangeLog
index 8e7e995b4b..05ae18a160 100644
--- a/sim/frv/ChangeLog
+++ b/sim/frv/ChangeLog
@@ -1,5 +1,10 @@
2015-04-15 Mike Frysinger <vapier@gentoo.org>
+ * Makefile.in (SIM_OBJS): Delete sim-cpu.o.
+ * sim-main.h (STATE_CPU): Delete.
+
+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.
diff --git a/sim/frv/Makefile.in b/sim/frv/Makefile.in
index 415d2abd42..6dc5616a56 100644
--- a/sim/frv/Makefile.in
+++ b/sim/frv/Makefile.in
@@ -21,7 +21,6 @@ FRV_OBJS = frv.o cpu.o decode.o sem.o model.o mloop.o cgen-par.o
SIM_OBJS = \
$(SIM_NEW_COMMON_OBJS) \
- sim-cpu.o \
sim-hload.o \
sim-model.o \
sim-reg.o \
diff --git a/sim/frv/sim-main.h b/sim/frv/sim-main.h
index e7dc1a2d91..1fd60b58cf 100644
--- a/sim/frv/sim-main.h
+++ b/sim/frv/sim-main.h
@@ -119,11 +119,6 @@ struct _sim_cpu {
struct sim_state {
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;
diff --git a/sim/ft32/ChangeLog b/sim/ft32/ChangeLog
index f3208e6f6c..07fb6a6860 100644
--- a/sim/ft32/ChangeLog
+++ b/sim/ft32/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-15 Mike Frysinger <vapier@gentoo.org>
+
+ * Makefile.in (SIM_OBJS): Delete sim-cpu.o.
+ * sim-main.h (STATE_CPU): Delete.
+
2015-04-13 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
diff --git a/sim/ft32/Makefile.in b/sim/ft32/Makefile.in
index c124bf3716..69bf060900 100644
--- a/sim/ft32/Makefile.in
+++ b/sim/ft32/Makefile.in
@@ -24,7 +24,6 @@ SIM_OBJS = \
sim-bits.o \
sim-config.o \
sim-core.o \
- sim-cpu.o \
sim-endian.o \
sim-events.o \
sim-fpu.o \
diff --git a/sim/ft32/sim-main.h b/sim/ft32/sim-main.h
index 6cb7c7ecff..1aa4248dc3 100644
--- a/sim/ft32/sim-main.h
+++ b/sim/ft32/sim-main.h
@@ -46,11 +46,6 @@ struct _sim_cpu {
struct sim_state {
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
sim_state_base base;
};
diff --git a/sim/h8300/ChangeLog b/sim/h8300/ChangeLog
index 1740b3db50..eaf3088987 100644
--- a/sim/h8300/ChangeLog
+++ b/sim/h8300/ChangeLog
@@ -1,5 +1,10 @@
2015-04-15 Mike Frysinger <vapier@gentoo.org>
+ * Makefile.in (SIM_OBJS): Delete sim-cpu.o.
+ * sim-main.h (STATE_CPU): Delete.
+
+2015-04-15 Mike Frysinger <vapier@gentoo.org>
+
* compile.c: Include sim-options.h.
(sim_open): Call sim_cpu_alloc_all instead of sim_cpu_alloc.
* sim-main.h (struct sim_state): Change cpu to an array of pointers.
diff --git a/sim/h8300/Makefile.in b/sim/h8300/Makefile.in
index 9b89aea2ab..da68255b6b 100644
--- a/sim/h8300/Makefile.in
+++ b/sim/h8300/Makefile.in
@@ -19,7 +19,6 @@
SIM_OBJS = compile.o \
$(SIM_NEW_COMMON_OBJS) \
- sim-cpu.o \
sim-load.o
## COMMON_POST_CONFIG_FRAG
diff --git a/sim/h8300/sim-main.h b/sim/h8300/sim-main.h
index 7126fa35c0..8b075052f1 100644
--- a/sim/h8300/sim-main.h
+++ b/sim/h8300/sim-main.h
@@ -155,11 +155,6 @@ struct sim_state {
#define CIA_GET(CPU) (cpu_get_pc (CPU))
#define CIA_SET(CPU, VAL) (cpu_set_pc ((CPU), (VAL)))
-#if (WITH_SMP)
-#define STATE_CPU(sd,n) ((sd)->cpu[n])
-#else
-#define STATE_CPU(sd,n) ((sd)->cpu[0])
-#endif
#define cpu_set_pc(CPU, VAL) (((CPU)->pc) = (VAL))
#define cpu_get_pc(CPU) (((CPU)->pc))
diff --git a/sim/iq2000/ChangeLog b/sim/iq2000/ChangeLog
index b590cb043a..4278ae6f63 100644
--- a/sim/iq2000/ChangeLog
+++ b/sim/iq2000/ChangeLog
@@ -1,5 +1,10 @@
2015-04-15 Mike Frysinger <vapier@gentoo.org>
+ * Makefile.in (SIM_OBJS): Delete sim-cpu.o.
+ * sim-main.h (STATE_CPU): Delete.
+
+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.
diff --git a/sim/iq2000/Makefile.in b/sim/iq2000/Makefile.in
index 3e07c53d4c..0871877f11 100644
--- a/sim/iq2000/Makefile.in
+++ b/sim/iq2000/Makefile.in
@@ -21,7 +21,6 @@ IQ2000_OBJS = iq2000.o cpu.o decode.o sem.o model.o mloop.o
SIM_OBJS = \
$(SIM_NEW_COMMON_OBJS) \
- sim-cpu.o \
sim-hload.o \
sim-model.o \
sim-reg.o \
diff --git a/sim/iq2000/sim-main.h b/sim/iq2000/sim-main.h
index 623c0a6e57..1498eb4b1f 100644
--- a/sim/iq2000/sim-main.h
+++ b/sim/iq2000/sim-main.h
@@ -58,11 +58,6 @@ struct _sim_cpu {
struct sim_state {
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;
diff --git a/sim/lm32/ChangeLog b/sim/lm32/ChangeLog
index 94a1ccddbf..6464b772b2 100644
--- a/sim/lm32/ChangeLog
+++ b/sim/lm32/ChangeLog
@@ -1,5 +1,10 @@
2015-04-15 Mike Frysinger <vapier@gentoo.org>
+ * Makefile.in (SIM_OBJS): Delete sim-cpu.o.
+ * sim-main.h (STATE_CPU): Delete.
+
+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.
diff --git a/sim/lm32/Makefile.in b/sim/lm32/Makefile.in
index ea2dd2d9f1..8bbe01463d 100644
--- a/sim/lm32/Makefile.in
+++ b/sim/lm32/Makefile.in
@@ -6,7 +6,6 @@
# List of object files, less common parts.
SIM_OBJS = \
$(SIM_NEW_COMMON_OBJS) \
- sim-cpu.o \
sim-hload.o \
sim-model.o \
sim-reg.o \
diff --git a/sim/lm32/sim-main.h b/sim/lm32/sim-main.h
index d98560753d..dcb5ac099d 100644
--- a/sim/lm32/sim-main.h
+++ b/sim/lm32/sim-main.h
@@ -84,11 +84,6 @@ struct _sim_cpu
struct sim_state
{
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;
diff --git a/sim/m32r/ChangeLog b/sim/m32r/ChangeLog
index c8a285cfea..ab156178c9 100644
--- a/sim/m32r/ChangeLog
+++ b/sim/m32r/ChangeLog
@@ -1,5 +1,10 @@
2015-04-15 Mike Frysinger <vapier@gentoo.org>
+ * Makefile.in (SIM_OBJS): Delete sim-cpu.o.
+ * sim-main.h (STATE_CPU): Delete.
+
+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.
diff --git a/sim/m32r/Makefile.in b/sim/m32r/Makefile.in
index 8f134f3009..7090e5f19b 100644
--- a/sim/m32r/Makefile.in
+++ b/sim/m32r/Makefile.in
@@ -26,7 +26,6 @@ TRAPS_OBJ = @traps_obj@
SIM_OBJS = \
$(SIM_NEW_COMMON_OBJS) \
- sim-cpu.o \
sim-hload.o \
sim-model.o \
sim-reg.o \
diff --git a/sim/m32r/sim-main.h b/sim/m32r/sim-main.h
index 96c1ec1747..9f859e2b6c 100644
--- a/sim/m32r/sim-main.h
+++ b/sim/m32r/sim-main.h
@@ -69,11 +69,6 @@ struct _sim_cpu {
struct sim_state {
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;
diff --git a/sim/m68hc11/ChangeLog b/sim/m68hc11/ChangeLog
index adedfc4b82..64cb223dd8 100644
--- a/sim/m68hc11/ChangeLog
+++ b/sim/m68hc11/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-15 Mike Frysinger <vapier@gentoo.org>
+
+ * Makefile.in (SIM_OBJS): Delete sim-cpu.o.
+ * sim-main.h (STATE_CPU): Delete.
+
2015-04-13 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
diff --git a/sim/m68hc11/Makefile.in b/sim/m68hc11/Makefile.in
index 7db38973c5..9b931a1995 100644
--- a/sim/m68hc11/Makefile.in
+++ b/sim/m68hc11/Makefile.in
@@ -22,7 +22,6 @@ M68HC11_OBJS = interp.o m68hc11int.o m68hc12int.o \
SIM_OBJS = $(M68HC11_OBJS) \
$(SIM_NEW_COMMON_OBJS) \
- sim-cpu.o \
sim-load.o \
sim-hload.o \
sim-stop.o \
diff --git a/sim/m68hc11/sim-main.h b/sim/m68hc11/sim-main.h
index be3fc3d8e8..9c0a1ed00f 100644
--- a/sim/m68hc11/sim-main.h
+++ b/sim/m68hc11/sim-main.h
@@ -577,12 +577,6 @@ extern void m68hc11cpu_set_port (struct hw *me, sim_cpu *cpu,
#define CIA_GET(CPU) (cpu_get_pc (CPU))
#define CIA_SET(CPU,VAL) (cpu_set_pc ((CPU), (VAL)))
-#if (WITH_SMP)
-#define STATE_CPU(sd,n) ((sd)->cpu[n])
-#else
-#define STATE_CPU(sd,n) ((sd)->cpu[0])
-#endif
-
struct sim_state {
sim_cpu *cpu[MAX_NR_PROCESSORS];
device *devices;
diff --git a/sim/mcore/ChangeLog b/sim/mcore/ChangeLog
index f8f29a8cf1..152864e8db 100644
--- a/sim/mcore/ChangeLog
+++ b/sim/mcore/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-15 Mike Frysinger <vapier@gentoo.org>
+
+ * Makefile.in (SIM_OBJS): Delete sim-cpu.o.
+ * sim-main.h (STATE_CPU): Delete.
+
2015-04-13 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
diff --git a/sim/mcore/Makefile.in b/sim/mcore/Makefile.in
index a54c92ce9f..407b600f97 100644
--- a/sim/mcore/Makefile.in
+++ b/sim/mcore/Makefile.in
@@ -20,7 +20,6 @@
SIM_OBJS = \
interp.o \
$(SIM_NEW_COMMON_OBJS) \
- sim-cpu.o \
sim-hload.o \
sim-stop.o
diff --git a/sim/mcore/sim-main.h b/sim/mcore/sim-main.h
index 96954b8c2e..80b467a117 100644
--- a/sim/mcore/sim-main.h
+++ b/sim/mcore/sim-main.h
@@ -43,11 +43,6 @@ struct _sim_cpu {
struct sim_state {
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
sim_state_base base;
};
diff --git a/sim/microblaze/ChangeLog b/sim/microblaze/ChangeLog
index 7285fd7745..9fd188c1fd 100644
--- a/sim/microblaze/ChangeLog
+++ b/sim/microblaze/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-15 Mike Frysinger <vapier@gentoo.org>
+
+ * Makefile.in (SIM_OBJS): Delete sim-cpu.o.
+ * sim-main.h (STATE_CPU): Delete.
+
2015-04-13 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
diff --git a/sim/microblaze/Makefile.in b/sim/microblaze/Makefile.in
index 0085948dd9..6c631291b1 100644
--- a/sim/microblaze/Makefile.in
+++ b/sim/microblaze/Makefile.in
@@ -20,7 +20,6 @@
SIM_OBJS = \
interp.o \
$(SIM_NEW_COMMON_OBJS) \
- sim-cpu.o \
sim-hload.o \
sim-reason.o \
sim-stop.o
diff --git a/sim/microblaze/sim-main.h b/sim/microblaze/sim-main.h
index cf1a5f9930..68f8223857 100644
--- a/sim/microblaze/sim-main.h
+++ b/sim/microblaze/sim-main.h
@@ -62,11 +62,6 @@ struct _sim_cpu {
struct sim_state {
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
sim_state_base base;
};
diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog
index 7577dc679e..249e8c5738 100644
--- a/sim/mips/ChangeLog
+++ b/sim/mips/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-15 Mike Frysinger <vapier@gentoo.org>
+
+ * Makefile.in (SIM_OBJS): Delete sim-cpu.o.
+ * sim-main.h (STATE_CPU): Delete.
+
2015-04-13 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
diff --git a/sim/mips/Makefile.in b/sim/mips/Makefile.in
index 96131ae547..17eeab6ae0 100644
--- a/sim/mips/Makefile.in
+++ b/sim/mips/Makefile.in
@@ -46,7 +46,6 @@ SIM_OBJS = \
cp1.o \
mdmx.o \
dsp.o \
- sim-cpu.o \
sim-main.o \
sim-hload.o \
sim-stop.o \
diff --git a/sim/mips/sim-main.h b/sim/mips/sim-main.h
index e27636c12f..a044504020 100644
--- a/sim/mips/sim-main.h
+++ b/sim/mips/sim-main.h
@@ -489,11 +489,6 @@ struct sim_state {
struct swatch watch;
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
sim_state_base base;
};
diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog
index 87985d6ccd..eca9946adc 100644
--- a/sim/mn10300/ChangeLog
+++ b/sim/mn10300/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-15 Mike Frysinger <vapier@gentoo.org>
+
+ * Makefile.in (MN10300_OBJS): Delete sim-cpu.o.
+ * sim-main.h (STATE_CPU): Delete.
+
2015-04-13 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
diff --git a/sim/mn10300/Makefile.in b/sim/mn10300/Makefile.in
index 3b4c7d2a3b..a85d932ba7 100644
--- a/sim/mn10300/Makefile.in
+++ b/sim/mn10300/Makefile.in
@@ -21,7 +21,6 @@ MN10300_OBJS = \
itable.o semantics.o idecode.o icache.o engine.o irun.o support.o \
$(SIM_NEW_COMMON_OBJS) \
op_utils.o \
- sim-cpu.o \
sim-hload.o \
sim-resume.o \
sim-reason.o \
diff --git a/sim/mn10300/sim-main.h b/sim/mn10300/sim-main.h
index 046aa17f59..47c017e576 100644
--- a/sim/mn10300/sim-main.h
+++ b/sim/mn10300/sim-main.h
@@ -86,11 +86,6 @@ struct sim_state {
/* the processors proper */
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
/* The base class. */
sim_state_base base;
diff --git a/sim/moxie/ChangeLog b/sim/moxie/ChangeLog
index 32b4f456d2..b2cf6f6a59 100644
--- a/sim/moxie/ChangeLog
+++ b/sim/moxie/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-15 Mike Frysinger <vapier@gentoo.org>
+
+ * Makefile.in (SIM_OBJS): Delete sim-cpu.o.
+ * sim-main.h (STATE_CPU): Delete.
+
2015-04-13 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
diff --git a/sim/moxie/Makefile.in b/sim/moxie/Makefile.in
index ff6bed9ff4..21dfe0108d 100644
--- a/sim/moxie/Makefile.in
+++ b/sim/moxie/Makefile.in
@@ -22,7 +22,6 @@ dtbdir = @datadir@/gdb/dtb
SIM_OBJS = \
$(SIM_NEW_COMMON_OBJS) \
interp.o \
- sim-cpu.o \
sim-hload.o \
sim-reason.o \
sim-resume.o \
diff --git a/sim/moxie/sim-main.h b/sim/moxie/sim-main.h
index cb1ce7233e..5a9f7c7119 100644
--- a/sim/moxie/sim-main.h
+++ b/sim/moxie/sim-main.h
@@ -47,11 +47,6 @@ struct _sim_cpu {
struct sim_state {
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
sim_state_base base;
};
diff --git a/sim/msp430/ChangeLog b/sim/msp430/ChangeLog
index 9347ed5df1..37204f2f96 100644
--- a/sim/msp430/ChangeLog
+++ b/sim/msp430/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-15 Mike Frysinger <vapier@gentoo.org>
+
+ * Makefile.in (SIM_OBJS): Delete sim-cpu.o.
+ * sim-main.h (STATE_CPU): Delete.
+
2015-04-13 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
diff --git a/sim/msp430/Makefile.in b/sim/msp430/Makefile.in
index 3ab384f3a8..4653d975ad 100644
--- a/sim/msp430/Makefile.in
+++ b/sim/msp430/Makefile.in
@@ -28,7 +28,6 @@ SIM_OBJS = \
$(SIM_NEW_COMMON_OBJS) \
msp430-sim.o \
trace.o \
- sim-cpu.o \
sim-hload.o \
sim-reason.o \
sim-reg.o \
diff --git a/sim/msp430/sim-main.h b/sim/msp430/sim-main.h
index f625bd513f..d71217e928 100644
--- a/sim/msp430/sim-main.h
+++ b/sim/msp430/sim-main.h
@@ -42,12 +42,6 @@ struct sim_state
{
sim_cpu *cpu[MAX_NR_PROCESSORS];
-#if (WITH_SMP)
-#error WITH_SMP not supported by MSP430 sim
-#else
-#define STATE_CPU(sd,n) ((sd)->cpu[0])
-#endif
-
asymbol **symbol_table;
long number_of_symbols;
#define STATE_SYMBOL_TABLE(sd) ((sd)->symbol_table)
diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog
index 23efac2a88..9b5c69e2a7 100644
--- a/sim/sh/ChangeLog
+++ b/sim/sh/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-15 Mike Frysinger <vapier@gentoo.org>
+
+ * Makefile.in (SIM_OBJS): Delete sim-cpu.o.
+ * sim-main.h (STATE_CPU): Delete.
+
2015-04-13 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
diff --git a/sim/sh/Makefile.in b/sim/sh/Makefile.in
index 19c15abb2a..236af86d89 100644
--- a/sim/sh/Makefile.in
+++ b/sim/sh/Makefile.in
@@ -20,7 +20,6 @@
SIM_OBJS = \
interp.o \
$(SIM_NEW_COMMON_OBJS) \
- sim-cpu.o \
sim-hload.o \
sim-stop.o \
table.o
diff --git a/sim/sh/sim-main.h b/sim/sh/sim-main.h
index e15a26af6b..3ae5f0fef9 100644
--- a/sim/sh/sim-main.h
+++ b/sim/sh/sim-main.h
@@ -142,11 +142,6 @@ struct _sim_cpu {
struct sim_state {
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
sim_state_base base;
};
diff --git a/sim/sh64/ChangeLog b/sim/sh64/ChangeLog
index 5bbc7a3f51..7146868906 100644
--- a/sim/sh64/ChangeLog
+++ b/sim/sh64/ChangeLog
@@ -1,5 +1,10 @@
2015-04-15 Mike Frysinger <vapier@gentoo.org>
+ * Makefile.in (SIM_OBJS): Delete sim-cpu.o.
+ * sim-main.h (STATE_CPU): Delete.
+
+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.
diff --git a/sim/sh64/Makefile.in b/sim/sh64/Makefile.in
index 19c9957a13..99ed4e8f52 100644
--- a/sim/sh64/Makefile.in
+++ b/sim/sh64/Makefile.in
@@ -23,7 +23,6 @@ SH64_OBJS = sh64.o cpu.o sh-desc.o \
SIM_OBJS = \
$(SIM_NEW_COMMON_OBJS) \
- sim-cpu.o \
sim-hload.o \
sim-model.o \
sim-reg.o \
diff --git a/sim/sh64/sim-main.h b/sim/sh64/sim-main.h
index 5ae4309916..b988e8eff6 100644
--- a/sim/sh64/sim-main.h
+++ b/sim/sh64/sim-main.h
@@ -54,11 +54,6 @@ struct _sim_cpu {
struct sim_state {
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;
diff --git a/sim/v850/ChangeLog b/sim/v850/ChangeLog
index 62c6ef05a7..bcc9bd5a8f 100644
--- a/sim/v850/ChangeLog
+++ b/sim/v850/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-15 Mike Frysinger <vapier@gentoo.org>
+
+ * Makefile.in (SIM_OBJS): Delete sim-cpu.o.
+ * sim-main.h (STATE_CPU): Delete.
+
2015-04-13 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
diff --git a/sim/v850/Makefile.in b/sim/v850/Makefile.in
index e78fda955d..726ed5e06f 100644
--- a/sim/v850/Makefile.in
+++ b/sim/v850/Makefile.in
@@ -23,7 +23,6 @@ SIM_OBJS = \
$(SIM_NEW_COMMON_OBJS) \
simops.o interp.o \
itable.o semantics.o idecode.o icache.o engine.o irun.o support.o \
- sim-cpu.o \
sim-hload.o \
sim-resume.o \
sim-reason.o \
diff --git a/sim/v850/sim-main.h b/sim/v850/sim-main.h
index 102c91785b..0a02565180 100644
--- a/sim/v850/sim-main.h
+++ b/sim/v850/sim-main.h
@@ -66,11 +66,6 @@ struct _sim_cpu
struct sim_state {
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
#if 0
SIM_ADDR rom_size;
SIM_ADDR low_end;