sim: mips: convert to sim-cpu

Make cpu allocation fully dynamic so we can leverage the common
sim-cpu and its APIs.
This commit is contained in:
Mike Frysinger
2015-04-13 02:09:55 -04:00
parent bea3f671c5
commit 7bebb329bb
4 changed files with 44 additions and 11 deletions

View File

@@ -36,6 +36,8 @@ mips_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), (TRANSFER), (ER
typedef address_word sim_cia;
typedef struct _sim_cpu SIM_CPU;
#include "sim-base.h"
#include "bfd.h"
@@ -486,14 +488,13 @@ struct sim_state {
struct swatch watch;
sim_cpu cpu[MAX_NR_PROCESSORS];
sim_cpu *cpu[MAX_NR_PROCESSORS];
#if (WITH_SMP)
#define STATE_CPU(sd,n) (&(sd)->cpu[n])
#define STATE_CPU(sd,n) ((sd)->cpu[n])
#else
#define STATE_CPU(sd,n) (&(sd)->cpu[0])
#define STATE_CPU(sd,n) ((sd)->cpu[0])
#endif
sim_state_base base;
};