sim: unify SIM_CPU definition
[binutils-gdb.git] / sim / cris / sim-main.h
index 56e014402fa2ac3d85e53cecc877f83104589609..6e501061bfffee64a603c9d61be2a1a394e2413d 100644 (file)
@@ -1,6 +1,5 @@
 /* Main header for the CRIS simulator, based on the m32r header.
-   Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009
-   Free Software Foundation, Inc.
+   Copyright (C) 2004-2015 Free Software Foundation, Inc.
    Contributed by Axis Communications.
 
 This file is part of the GNU simulators.
@@ -27,9 +26,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #define USING_SIM_BASE_H
 
-struct _sim_cpu;
-typedef struct _sim_cpu SIM_CPU;
-
 #include "symcat.h"
 #include "sim-basics.h"
 #include "cgen-types.h"
@@ -37,12 +33,6 @@ typedef struct _sim_cpu SIM_CPU;
 #include "cris-opc.h"
 #include "arch.h"
 
-/* These must be defined before sim-base.h.  */
-typedef USI sim_cia;
-
-#define CIA_GET(cpu)     CPU_PC_GET (cpu)
-#define CIA_SET(cpu,val) CPU_PC_SET ((cpu), (val))
-
 #define SIM_ENGINE_HALT_HOOK(sd, cpu, cia) \
 do { \
   if (cpu) /* Null if ctrl-c.  */ \
@@ -226,8 +216,7 @@ 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];
 
   CGEN_STATE cgen_state;