aboutsummaryrefslogtreecommitdiff
path: root/sim/iq2000/sim-main.h
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2022-11-01 18:49:48 +0545
committerMike Frysinger <vapier@gentoo.org>2022-12-21 00:00:01 -0500
commit06f4b7b6d11c87b6420a1afe495d66c55be46913 (patch)
tree4d97772eefa2b5b2baaa88b8345e87ce1032fb41 /sim/iq2000/sim-main.h
parent811727abbd870ad86d21e537ba80ddeac8836167 (diff)
downloadfsf-binutils-gdb-06f4b7b6d11c87b6420a1afe495d66c55be46913.zip
fsf-binutils-gdb-06f4b7b6d11c87b6420a1afe495d66c55be46913.tar.gz
fsf-binutils-gdb-06f4b7b6d11c87b6420a1afe495d66c55be46913.tar.bz2
sim: iq2000: invert sim_cpu storage
The cpu.h change is in generated cgen code, but that has been sent upstream too, so the next regen should include it automatically.
Diffstat (limited to 'sim/iq2000/sim-main.h')
-rw-r--r--sim/iq2000/sim-main.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/sim/iq2000/sim-main.h b/sim/iq2000/sim-main.h
index bf06082..bb927fc 100644
--- a/sim/iq2000/sim-main.h
+++ b/sim/iq2000/sim-main.h
@@ -4,6 +4,8 @@
#ifndef SIM_MAIN_H
#define SIM_MAIN_H
+#define SIM_HAVE_COMMON_SIM_CPU
+
/* This is a global setting. Different cpu families can't mix-n-match -scache
and -pbb. However some cpu families may use -simple while others use
one of -scache/-pbb. ???? */
@@ -22,15 +24,7 @@
#include "sim-base.h"
#include "cgen-sim.h"
-/* The _sim_cpu struct. */
-
-struct _sim_cpu {
- /* sim/common cpu base. */
- sim_cpu_base base;
-
- /* Static parts of cgen. */
- CGEN_CPU cgen_cpu;
-
+struct iq2000_sim_cpu {
/* CPU specific parts go here.
Note that in files that don't need to access these pieces WANT_CPU_FOO
won't be defined and thus these parts won't appear. This is ok in the
@@ -42,6 +36,7 @@ struct _sim_cpu {
IQ2000BF_CPU_DATA cpu_data;
#endif
};
+#define IQ2000_SIM_CPU(cpu) ((struct iq2000_sim_cpu *) CPU_ARCH_DATA (cpu))
/* Misc. */