diff options
author | Mike Frysinger <vapier@gentoo.org> | 2016-08-12 23:43:27 +0800 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2022-12-20 23:57:38 -0500 |
commit | ffeb72b44c8c5060465005178dd3a4a304117a58 (patch) | |
tree | b44abd51ce73b4207664c3570fb0a834668aff65 /sim/cr16 | |
parent | d026e67ed41a249ec758847008d8a19257bf45fc (diff) | |
download | gdb-ffeb72b44c8c5060465005178dd3a4a304117a58.zip gdb-ffeb72b44c8c5060465005178dd3a4a304117a58.tar.gz gdb-ffeb72b44c8c5060465005178dd3a4a304117a58.tar.bz2 |
sim: sim_cpu: invert sim_cpu storage
Currently all ports have to declare sim_cpu themselves in their
sim-main.h and then embed the common sim_cpu_base in it. This
dynamic makes it impossible to share common object code among
multiple ports because the core data structure is always different.
Let's invert this relationship: common code declares sim_cpu, and
the port uses the new arch_data field for its per-cpu state.
This is the first in a series of changes: it adds a define to select
between the old & new layouts, then converts all the ports that don't
need custom state over to the new layout. This includes mn10300 that,
while it defines custom fields in its cpu struct, never uses them.
Diffstat (limited to 'sim/cr16')
-rw-r--r-- | sim/cr16/sim-main.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sim/cr16/sim-main.h b/sim/cr16/sim-main.h index adf242a..7ac6bd2 100644 --- a/sim/cr16/sim-main.h +++ b/sim/cr16/sim-main.h @@ -19,6 +19,8 @@ #ifndef SIM_MAIN_H #define SIM_MAIN_H +#define SIM_HAVE_COMMON_SIM_CPU + #include "sim-basics.h" typedef long int word; @@ -29,9 +31,4 @@ typedef unsigned long int uword; #include "cr16_sim.h" -struct _sim_cpu { - - sim_cpu_base base; -}; - #endif |