]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - sim/h8300/sim-main.h
sim: cris/frv/h8300/iq2000/lm32/m32r/sh64: standardize cpu state
[thirdparty/binutils-gdb.git] / sim / h8300 / sim-main.h
index 964388ac56055cffd3c99e3a7d199c2ee25230ea..7126fa35c005988bcc5f61f1cb4f513d6f4927f1 100644 (file)
@@ -138,7 +138,7 @@ struct _sim_cpu {
 
 /* The sim_state struct.  */
 struct sim_state {
-  struct _sim_cpu *cpu;
+  sim_cpu *cpu[MAX_NR_PROCESSORS];
   unsigned int sim_cache_size;
   decoded_inst *sim_cache;
   unsigned short *cache_idx;
@@ -155,7 +155,11 @@ struct sim_state {
 
 #define CIA_GET(CPU)           (cpu_get_pc (CPU))
 #define CIA_SET(CPU, VAL)      (cpu_set_pc ((CPU), (VAL)))
-#define STATE_CPU(SD, N)       ((SD)->cpu)     /* Single Processor.  */
+#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))