diff options
author | Mike Frysinger <vapier@gentoo.org> | 2015-04-13 02:11:24 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2015-04-13 02:11:50 -0400 |
commit | 14c9ad2edb6e0bb0b560fa45699b83d85aa28b94 (patch) | |
tree | 183183d1bc008d9da91182db3ced6f320f583716 /sim/v850/sim-main.h | |
parent | 7bebb329bbad32b948939c5f437b2b4eebe7e9fd (diff) | |
download | gdb-14c9ad2edb6e0bb0b560fa45699b83d85aa28b94.zip gdb-14c9ad2edb6e0bb0b560fa45699b83d85aa28b94.tar.gz gdb-14c9ad2edb6e0bb0b560fa45699b83d85aa28b94.tar.bz2 |
sim: v850: convert to sim-cpu
Make cpu allocation fully dynamic so we can leverage the common
sim-cpu and its APIs.
Diffstat (limited to 'sim/v850/sim-main.h')
-rw-r--r-- | sim/v850/sim-main.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sim/v850/sim-main.h b/sim/v850/sim-main.h index 505b19e..102c917 100644 --- a/sim/v850/sim-main.h +++ b/sim/v850/sim-main.h @@ -19,6 +19,8 @@ typedef address_word sim_cia; +typedef struct _sim_cpu SIM_CPU; + #include "sim-base.h" #include "simops.h" @@ -63,11 +65,11 @@ struct _sim_cpu #define CIA_SET(CPU,VAL) ((CPU)->reg.pc = (VAL)) struct sim_state { - 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 #if 0 SIM_ADDR rom_size; |