From 383861bd08c47a160f54351e6b8519140b9aad8e Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 21 Jan 2016 21:00:25 -0500 Subject: [PATCH 1/1] sim: invert sim_state storage Currently all ports have to declare sim_state themselves in their sim-main.h and then embed the common sim_state_base & sim_cpu 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_state, and if the port actually needs state on a per-instance basis, it can use the new arch_data field for it. Most ports don't actually use it, so they don't need to declare anything at all. 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. --- sim/aarch64/ChangeLog | 5 +++++ sim/aarch64/sim-main.h | 9 ++------- sim/arm/ChangeLog | 5 +++++ sim/arm/sim-main.h | 9 ++------- sim/common/ChangeLog | 10 ++++++++++ sim/common/sim-base.h | 30 +++++++++++++++++++++--------- sim/common/sim-utils.c | 9 +++++++-- sim/cr16/ChangeLog | 5 +++++ sim/cr16/sim-main.h | 9 ++------- sim/d10v/ChangeLog | 5 +++++ sim/d10v/sim-main.h | 9 ++------- sim/example-synacor/ChangeLog | 5 +++++ sim/example-synacor/sim-main.h | 9 ++------- sim/ft32/ChangeLog | 5 +++++ sim/ft32/sim-main.h | 9 ++------- sim/m68hc11/ChangeLog | 5 +++++ sim/m68hc11/sim-main.h | 9 ++------- sim/mcore/ChangeLog | 5 +++++ sim/mcore/sim-main.h | 9 ++------- sim/microblaze/ChangeLog | 5 +++++ sim/microblaze/sim-main.h | 9 ++------- sim/mn10300/ChangeLog | 5 +++++ sim/mn10300/sim-main.h | 13 ++----------- sim/moxie/ChangeLog | 5 +++++ sim/moxie/sim-main.h | 9 ++------- sim/msp430/ChangeLog | 5 +++++ sim/msp430/sim-main.h | 10 ++-------- sim/pru/ChangeLog | 5 +++++ sim/pru/sim-main.h | 7 ++----- sim/sh/ChangeLog | 5 +++++ sim/sh/sim-main.h | 9 ++------- sim/v850/ChangeLog | 5 +++++ sim/v850/sim-main.h | 14 ++------------ 33 files changed, 143 insertions(+), 124 deletions(-) diff --git a/sim/aarch64/ChangeLog b/sim/aarch64/ChangeLog index b5ef612e6f1..c02019fc375 100644 --- a/sim/aarch64/ChangeLog +++ b/sim/aarch64/ChangeLog @@ -1,3 +1,8 @@ +2021-05-17 Mike Frysinger + + * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Define. + (struct sim_state): Delete. + 2021-05-16 Mike Frysinger * cpustate.c: Include defs.h. diff --git a/sim/aarch64/sim-main.h b/sim/aarch64/sim-main.h index a2704a75ba1..f1f9e5cf681 100644 --- a/sim/aarch64/sim-main.h +++ b/sim/aarch64/sim-main.h @@ -22,6 +22,8 @@ #ifndef _SIM_MAIN_H #define _SIM_MAIN_H +#define SIM_HAVE_COMMON_SIM_STATE + #include "sim-basics.h" #include "sim-types.h" #include "sim-base.h" @@ -60,11 +62,4 @@ typedef enum AARCH64_MAX_REGNO = 67 } aarch64_regno; -/* The simulator state structure used to hold all global variables. */ -struct sim_state -{ - sim_cpu * cpu[MAX_NR_PROCESSORS]; - sim_state_base base; -}; - #endif /* _SIM_MAIN_H */ diff --git a/sim/arm/ChangeLog b/sim/arm/ChangeLog index aabdae22412..f8aa04223c4 100644 --- a/sim/arm/ChangeLog +++ b/sim/arm/ChangeLog @@ -1,3 +1,8 @@ +2021-05-17 Mike Frysinger + + * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Define. + (struct sim_state): Delete. + 2021-05-16 Mike Frysinger * armcopro.c, armemu.c, arminit.c, armsupp.c, armvirt.c, iwmmxt.c, diff --git a/sim/arm/sim-main.h b/sim/arm/sim-main.h index 7644b934908..b4714944133 100644 --- a/sim/arm/sim-main.h +++ b/sim/arm/sim-main.h @@ -19,6 +19,8 @@ #ifndef SIM_MAIN_H #define SIM_MAIN_H +#define SIM_HAVE_COMMON_SIM_STATE + #include "sim-basics.h" #include "sim-base.h" #include "bfd.h" @@ -33,11 +35,4 @@ struct _sim_cpu { sim_cpu_base base; }; -struct sim_state { - - sim_cpu *cpu[MAX_NR_PROCESSORS]; - - sim_state_base base; -}; - #endif diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 1d875bb1cbd..f3fcaee0b05 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,13 @@ +2021-05-17 Mike Frysinger + + * sim-base.h (struct sim_state): Update comment. + (struct sim_state): Define. + (STATE_ARCH_DATA): Likewise. + (sim_state_alloc): New define. + (sim_state_alloc_extra): Renamed & add 3rd arg. + * sim-utils.c (sim_state_alloc): Likewise. + (sim_state_alloc_extra): Set arch data. + 2021-05-16 Mike Frysinger * callback.c: Replace config.h include with defs.h. diff --git a/sim/common/sim-base.h b/sim/common/sim-base.h index 731fc7f6d08..f38e8412aed 100644 --- a/sim/common/sim-base.h +++ b/sim/common/sim-base.h @@ -42,14 +42,7 @@ along with this program. If not, see . */ sim_cpu_base base; }; - struct sim_state { - sim_cpu *cpu[MAX_NR_PROCESSORS]; - ... simulator specific members ... - sim_state_base base; - }; - - Note that `base' appears last. This makes `base.magic' appear last - in the entire struct and helps catch miscompilation errors. */ + If your sim needs to allocate sim-wide state, use STATE_ARCH_DATA. */ #ifndef SIM_BASE_H @@ -226,8 +219,27 @@ typedef struct { #define STATE_MAGIC(sd) ((sd)->base.magic) } sim_state_base; +#ifdef SIM_HAVE_COMMON_SIM_STATE +/* TODO: Merge sim_state & sim_state_base. */ +struct sim_state { + /* All the cpus for this instance. */ + sim_cpu *cpu[MAX_NR_PROCESSORS]; + + /* All the common state. */ + sim_state_base base; + + /* Pointer for sim target to store arbitrary state data. Normally the + target should define a struct and use it here. */ + void *arch_data; +#define STATE_ARCH_DATA(sd) ((sd)->arch_data) +}; +#endif + /* Functions for allocating/freeing a sim_state. */ -SIM_DESC sim_state_alloc (SIM_OPEN_KIND kind, host_callback *callback); +SIM_DESC sim_state_alloc_extra (SIM_OPEN_KIND kind, host_callback *callback, + size_t extra_bytes); +#define sim_state_alloc(kind, callback) sim_state_alloc_extra(kind, callback, 0) + void sim_state_free (SIM_DESC); #ifdef __cplusplus diff --git a/sim/common/sim-utils.c b/sim/common/sim-utils.c index abb87f8c5a0..7a943756daf 100644 --- a/sim/common/sim-utils.c +++ b/sim/common/sim-utils.c @@ -48,8 +48,8 @@ zalloc (unsigned long size) /* Allocate a sim_state struct. */ SIM_DESC -sim_state_alloc (SIM_OPEN_KIND kind, - host_callback *callback) +sim_state_alloc_extra (SIM_OPEN_KIND kind, host_callback *callback, + size_t extra_bytes) { SIM_DESC sd = ZALLOC (struct sim_state); @@ -57,6 +57,11 @@ sim_state_alloc (SIM_OPEN_KIND kind, STATE_CALLBACK (sd) = callback; STATE_OPEN_KIND (sd) = kind; +#ifdef SIM_HAVE_COMMON_SIM_STATE + if (extra_bytes) + STATE_ARCH_DATA (sd) = zalloc (extra_bytes); +#endif + #if 0 { int cpu_nr; diff --git a/sim/cr16/ChangeLog b/sim/cr16/ChangeLog index 1a7341d2e8e..84e0f8fed21 100644 --- a/sim/cr16/ChangeLog +++ b/sim/cr16/ChangeLog @@ -1,3 +1,8 @@ +2021-05-17 Mike Frysinger + + * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Define. + (struct sim_state): Delete. + 2021-05-16 Mike Frysinger * cr16_sim.h: Delete config.h include. diff --git a/sim/cr16/sim-main.h b/sim/cr16/sim-main.h index 639774ced1d..7ea5b1d3280 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_STATE + #include "sim-basics.h" typedef long int word; @@ -34,11 +36,4 @@ struct _sim_cpu { sim_cpu_base base; }; -struct sim_state { - - sim_cpu *cpu[MAX_NR_PROCESSORS]; - - sim_state_base base; -}; - #endif diff --git a/sim/d10v/ChangeLog b/sim/d10v/ChangeLog index bce1617d90e..421faeb0896 100644 --- a/sim/d10v/ChangeLog +++ b/sim/d10v/ChangeLog @@ -1,3 +1,8 @@ +2021-05-17 Mike Frysinger + + * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Define. + (struct sim_state): Delete. + 2021-05-16 Mike Frysinger * d10v_sim.h, gencode.c: Delete config.h include. diff --git a/sim/d10v/sim-main.h b/sim/d10v/sim-main.h index 0182263625e..83b34b06454 100644 --- a/sim/d10v/sim-main.h +++ b/sim/d10v/sim-main.h @@ -19,6 +19,8 @@ #ifndef SIM_MAIN_H #define SIM_MAIN_H +#define SIM_HAVE_COMMON_SIM_STATE + #include "sim-basics.h" typedef long int word; @@ -34,11 +36,4 @@ struct _sim_cpu { sim_cpu_base base; }; -struct sim_state { - - sim_cpu *cpu[MAX_NR_PROCESSORS]; - - sim_state_base base; -}; - #endif diff --git a/sim/example-synacor/ChangeLog b/sim/example-synacor/ChangeLog index ddd56b2ea8f..e65ec6568c4 100644 --- a/sim/example-synacor/ChangeLog +++ b/sim/example-synacor/ChangeLog @@ -1,3 +1,8 @@ +2021-05-17 Mike Frysinger + + * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Define. + (struct sim_state): Delete. + 2021-05-16 Mike Frysinger * interp.c, sim-main.c: Replace config.h include with defs.h. diff --git a/sim/example-synacor/sim-main.h b/sim/example-synacor/sim-main.h index ba0e4efa12a..32b33b4e90b 100644 --- a/sim/example-synacor/sim-main.h +++ b/sim/example-synacor/sim-main.h @@ -21,6 +21,8 @@ #ifndef SIM_MAIN_H #define SIM_MAIN_H +#define SIM_HAVE_COMMON_SIM_STATE + #include "sim-basics.h" #include "sim-base.h" @@ -36,13 +38,6 @@ struct _sim_cpu { sim_cpu_base base; }; -struct sim_state { - sim_cpu *cpu[MAX_NR_PROCESSORS]; - - /* ... simulator specific members ... */ - sim_state_base base; -}; - extern void step_once (SIM_CPU *); extern void initialize_cpu (SIM_DESC, SIM_CPU *); diff --git a/sim/ft32/ChangeLog b/sim/ft32/ChangeLog index 819625ef0e8..256058ac891 100644 --- a/sim/ft32/ChangeLog +++ b/sim/ft32/ChangeLog @@ -1,3 +1,8 @@ +2021-05-17 Mike Frysinger + + * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Define. + (struct sim_state): Delete. + 2021-05-16 Mike Frysinger * interp.c: Replace config.h include with defs.h. diff --git a/sim/ft32/sim-main.h b/sim/ft32/sim-main.h index 7f0f5e607a6..8cf384ceb8b 100644 --- a/sim/ft32/sim-main.h +++ b/sim/ft32/sim-main.h @@ -21,6 +21,8 @@ #ifndef SIM_MAIN_H #define SIM_MAIN_H +#define SIM_HAVE_COMMON_SIM_STATE + #include "sim-basics.h" #include "sim-base.h" #include "bfd.h" @@ -36,11 +38,4 @@ struct _sim_cpu { sim_cpu_base base; }; -struct sim_state { - - sim_cpu *cpu[MAX_NR_PROCESSORS]; - - sim_state_base base; -}; - #endif diff --git a/sim/m68hc11/ChangeLog b/sim/m68hc11/ChangeLog index a070cdd5286..c8d117717ac 100644 --- a/sim/m68hc11/ChangeLog +++ b/sim/m68hc11/ChangeLog @@ -1,3 +1,8 @@ +2021-05-17 Mike Frysinger + + * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Define. + (struct sim_state): Delete. + 2021-05-16 Mike Frysinger * dv-m68hc11.c, dv-m68hc11eepr.c, dv-m68hc11sio.c, dv-m68hc11spi.c, diff --git a/sim/m68hc11/sim-main.h b/sim/m68hc11/sim-main.h index 9b461ff0042..d72ede1aefa 100644 --- a/sim/m68hc11/sim-main.h +++ b/sim/m68hc11/sim-main.h @@ -20,6 +20,8 @@ along with this program. If not, see . */ #ifndef _SIM_MAIN_H #define _SIM_MAIN_H +#define SIM_HAVE_COMMON_SIM_STATE + #include "sim-basics.h" #include "sim-signal.h" #include "sim-base.h" @@ -560,13 +562,6 @@ extern int m68hc11cpu_clear_oscillator (SIM_DESC sd, const char *port); extern void m68hc11cpu_set_port (struct hw *me, sim_cpu *cpu, unsigned addr, uint8 val); -/* The current state of the processor; registers, memory, etc. */ - -struct sim_state { - sim_cpu *cpu[MAX_NR_PROCESSORS]; - sim_state_base base; -}; - extern void sim_board_reset (SIM_DESC sd); #define PRINT_TIME 0x01 diff --git a/sim/mcore/ChangeLog b/sim/mcore/ChangeLog index 7e708046213..7a5453f61f1 100644 --- a/sim/mcore/ChangeLog +++ b/sim/mcore/ChangeLog @@ -1,3 +1,8 @@ +2021-05-17 Mike Frysinger + + * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Define. + (struct sim_state): Delete. + 2021-05-16 Mike Frysinger * interp.c: Replace config.h include with defs.h. diff --git a/sim/mcore/sim-main.h b/sim/mcore/sim-main.h index dc749b7e20c..bfa28d045ce 100644 --- a/sim/mcore/sim-main.h +++ b/sim/mcore/sim-main.h @@ -19,6 +19,8 @@ along with this program. If not, see . */ #ifndef SIM_MAIN_H #define SIM_MAIN_H +#define SIM_HAVE_COMMON_SIM_STATE + #include "sim-basics.h" typedef long int word; @@ -68,12 +70,5 @@ struct _sim_cpu { sim_cpu_base base; }; -struct sim_state { - - sim_cpu *cpu[MAX_NR_PROCESSORS]; - - sim_state_base base; -}; - #endif diff --git a/sim/microblaze/ChangeLog b/sim/microblaze/ChangeLog index 7b205acf094..f583623a43d 100644 --- a/sim/microblaze/ChangeLog +++ b/sim/microblaze/ChangeLog @@ -1,3 +1,8 @@ +2021-05-17 Mike Frysinger + + * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Define. + (struct sim_state): Delete. + 2021-05-16 Mike Frysinger * interp.c: Replace config.h include with defs.h. diff --git a/sim/microblaze/sim-main.h b/sim/microblaze/sim-main.h index 641771a4af3..d69d814252a 100644 --- a/sim/microblaze/sim-main.h +++ b/sim/microblaze/sim-main.h @@ -18,6 +18,8 @@ #ifndef MICROBLAZE_SIM_MAIN #define MICROBLAZE_SIM_MAIN +#define SIM_HAVE_COMMON_SIM_STATE + #include "microblaze.h" #include "sim-basics.h" #include "sim-base.h" @@ -48,11 +50,4 @@ struct _sim_cpu { sim_cpu_base base; }; -struct sim_state { - - sim_cpu *cpu[MAX_NR_PROCESSORS]; - - sim_state_base base; -}; - #endif /* MICROBLAZE_SIM_MAIN */ diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog index 92dd6d1c347..75a447dedf1 100644 --- a/sim/mn10300/ChangeLog +++ b/sim/mn10300/ChangeLog @@ -1,3 +1,8 @@ +2021-05-17 Mike Frysinger + + * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Define. + (struct sim_state): Delete. + 2021-05-16 Mike Frysinger * dv-mn103cpu.c, dv-mn103int.c, dv-mn103iop.c, dv-mn103ser.c, diff --git a/sim/mn10300/sim-main.h b/sim/mn10300/sim-main.h index 5b3e593a7d0..5bf068b51fa 100644 --- a/sim/mn10300/sim-main.h +++ b/sim/mn10300/sim-main.h @@ -22,6 +22,8 @@ #ifndef SIM_MAIN_H #define SIM_MAIN_H +#define SIM_HAVE_COMMON_SIM_STATE + #define SIM_ENGINE_HALT_HOOK(SD,LAST_CPU,CIA) 0 /* disable this hook */ #include "sim-basics.h" @@ -65,17 +67,6 @@ struct _sim_cpu { sim_cpu_base base; }; - -struct sim_state { - - /* the processors proper */ - sim_cpu *cpu[MAX_NR_PROCESSORS]; - - /* The base class. */ - sim_state_base base; - -}; - /* For compatibility, until all functions converted to passing SIM_DESC as an argument */ extern SIM_DESC simulator; diff --git a/sim/moxie/ChangeLog b/sim/moxie/ChangeLog index 39b19d32186..a8a46a6ab6e 100644 --- a/sim/moxie/ChangeLog +++ b/sim/moxie/ChangeLog @@ -1,3 +1,8 @@ +2021-05-17 Mike Frysinger + + * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Define. + (struct sim_state): Delete. + 2021-05-16 Mike Frysinger * interp.c: Replace config.h include with defs.h. diff --git a/sim/moxie/sim-main.h b/sim/moxie/sim-main.h index 24557da1762..19b9475e985 100644 --- a/sim/moxie/sim-main.h +++ b/sim/moxie/sim-main.h @@ -20,6 +20,8 @@ along with this program. If not, see . */ #ifndef SIM_MAIN_H #define SIM_MAIN_H +#define SIM_HAVE_COMMON_SIM_STATE + #include "sim-basics.h" #include "sim-base.h" #include "bfd.h" @@ -39,11 +41,4 @@ struct _sim_cpu { sim_cpu_base base; }; -struct sim_state { - - sim_cpu *cpu[MAX_NR_PROCESSORS]; - - sim_state_base base; -}; - #endif diff --git a/sim/msp430/ChangeLog b/sim/msp430/ChangeLog index 4664091de00..1ea283ca052 100644 --- a/sim/msp430/ChangeLog +++ b/sim/msp430/ChangeLog @@ -1,3 +1,8 @@ +2021-05-17 Mike Frysinger + + * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Define. + (struct sim_state): Delete. + 2021-05-16 Mike Frysinger * msp430-sim.c: Replace config.h include with defs.h. diff --git a/sim/msp430/sim-main.h b/sim/msp430/sim-main.h index 22a53b4c9d3..f98712c12e5 100644 --- a/sim/msp430/sim-main.h +++ b/sim/msp430/sim-main.h @@ -21,6 +21,8 @@ #ifndef _MSP430_MAIN_SIM_H_ #define _MSP430_MAIN_SIM_H_ +#define SIM_HAVE_COMMON_SIM_STATE + #include "sim-basics.h" #include "sim-signal.h" #include "msp430-sim.h" @@ -33,14 +35,6 @@ struct _sim_cpu sim_cpu_base base; }; -struct sim_state -{ - sim_cpu *cpu[MAX_NR_PROCESSORS]; - - /* Simulator specific members. */ - sim_state_base base; -}; - #define MSP430_CPU(sd) (STATE_CPU ((sd), 0)) #define MSP430_CPU_STATE(sd) (MSP430_CPU ((sd)->state)) diff --git a/sim/pru/ChangeLog b/sim/pru/ChangeLog index 0fef8ffbc7c..27a0f9e9008 100644 --- a/sim/pru/ChangeLog +++ b/sim/pru/ChangeLog @@ -1,3 +1,8 @@ +2021-05-17 Mike Frysinger + + * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Define. + (struct sim_state): Delete. + 2021-05-16 Mike Frysinger * interp.c: Replace config.h include with defs.h. diff --git a/sim/pru/sim-main.h b/sim/pru/sim-main.h index 8233c20cefd..49c54f4f467 100644 --- a/sim/pru/sim-main.h +++ b/sim/pru/sim-main.h @@ -19,6 +19,8 @@ #ifndef PRU_SIM_MAIN #define PRU_SIM_MAIN +#define SIM_HAVE_COMMON_SIM_STATE + #include #include #include "pru.h" @@ -83,9 +85,4 @@ struct _sim_cpu { sim_cpu_base base; }; -struct sim_state { - sim_cpu *cpu[MAX_NR_PROCESSORS]; - - sim_state_base base; -}; #endif /* PRU_SIM_MAIN */ diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog index 3dc1630fc5e..b031cd3d0db 100644 --- a/sim/sh/ChangeLog +++ b/sim/sh/ChangeLog @@ -1,3 +1,8 @@ +2021-05-17 Mike Frysinger + + * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Define. + (struct sim_state): Delete. + 2021-05-16 Mike Frysinger * interp.c: Replace config.h include with defs.h. diff --git a/sim/sh/sim-main.h b/sim/sh/sim-main.h index 090b0ac9a00..58c1436531f 100644 --- a/sim/sh/sim-main.h +++ b/sim/sh/sim-main.h @@ -19,6 +19,8 @@ along with this program. If not, see . */ #ifndef SIM_MAIN_H #define SIM_MAIN_H +#define SIM_HAVE_COMMON_SIM_STATE + #include "sim-basics.h" #include "sim-base.h" @@ -131,11 +133,4 @@ struct _sim_cpu { sim_cpu_base base; }; -struct sim_state { - - sim_cpu *cpu[MAX_NR_PROCESSORS]; - - sim_state_base base; -}; - #endif diff --git a/sim/v850/ChangeLog b/sim/v850/ChangeLog index 81120ed51c0..82491e7a2d2 100644 --- a/sim/v850/ChangeLog +++ b/sim/v850/ChangeLog @@ -1,3 +1,8 @@ +2021-05-17 Mike Frysinger + + * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Define. + (struct sim_state): Delete. + 2021-05-16 Mike Frysinger * interp.c, simops.c: Include defs.h. diff --git a/sim/v850/sim-main.h b/sim/v850/sim-main.h index 6556273f678..6dc5c44582b 100644 --- a/sim/v850/sim-main.h +++ b/sim/v850/sim-main.h @@ -1,6 +1,8 @@ #ifndef SIM_MAIN_H #define SIM_MAIN_H +#define SIM_HAVE_COMMON_SIM_STATE + /* The v850 has 32bit words, numbered 31 (MSB) to 0 (LSB) */ #define WITH_TARGET_WORD_MSB 31 @@ -48,18 +50,6 @@ struct _sim_cpu sim_cpu_base base; }; -struct sim_state { - sim_cpu *cpu[MAX_NR_PROCESSORS]; -#if 0 - SIM_ADDR rom_size; - SIM_ADDR low_end; - SIM_ADDR high_start; - SIM_ADDR high_base; - void *mem; -#endif - sim_state_base base; -}; - /* For compatibility, until all functions converted to passing SIM_DESC as an argument */ extern SIM_DESC simulator; -- 2.39.2