aboutsummaryrefslogtreecommitdiff
path: root/sim/v850/sim-main.h
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-04-13 02:11:24 -0400
committerMike Frysinger <vapier@gentoo.org>2015-04-13 02:11:50 -0400
commit14c9ad2edb6e0bb0b560fa45699b83d85aa28b94 (patch)
tree183183d1bc008d9da91182db3ced6f320f583716 /sim/v850/sim-main.h
parent7bebb329bbad32b948939c5f437b2b4eebe7e9fd (diff)
downloadgdb-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.h8
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;