From 14c9ad2edb6e0bb0b560fa45699b83d85aa28b94 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 13 Apr 2015 02:11:24 -0400 Subject: sim: v850: convert to sim-cpu Make cpu allocation fully dynamic so we can leverage the common sim-cpu and its APIs. --- sim/v850/sim-main.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sim/v850/sim-main.h') 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; -- cgit v1.1