mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-29 10:30:46 +00:00
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:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user