X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=sim%2Fcris%2Fsim-main.h;h=ff75cc209f920732659da6944b0be9d703c01a0c;hb=17fc27167f678285d2f64040837b8cc41b6a664a;hp=602fd44d68fd0bd2b52f9a4c3cc81415a0ccddd3;hpb=4744ac1bb0d2f2294c7762577262fdcafb67883b;p=deliverable%2Fbinutils-gdb.git diff --git a/sim/cris/sim-main.h b/sim/cris/sim-main.h index 602fd44d68..ff75cc209f 100644 --- a/sim/cris/sim-main.h +++ b/sim/cris/sim-main.h @@ -1,5 +1,5 @@ /* Main header for the CRIS simulator, based on the m32r header. - Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc. + Copyright (C) 2004-2020 Free Software Foundation, Inc. Contributed by Axis Communications. This file is part of the GNU simulators. @@ -24,10 +24,10 @@ along with this program. If not, see . */ #ifndef SIM_MAIN_H #define SIM_MAIN_H -#define USING_SIM_BASE_H - -struct _sim_cpu; -typedef struct _sim_cpu 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. */ +#define WITH_SCACHE_PBB 1 #include "symcat.h" #include "sim-basics.h" @@ -35,23 +35,6 @@ typedef struct _sim_cpu SIM_CPU; #include "cris-desc.h" #include "cris-opc.h" #include "arch.h" - -/* These must be defined before sim-base.h. */ -typedef USI sim_cia; - -#define CIA_GET(cpu) CPU_PC_GET (cpu) -#define CIA_SET(cpu,val) CPU_PC_SET ((cpu), (val)) - -#define SIM_ENGINE_HALT_HOOK(sd, cpu, cia) \ -do { \ - if (cpu) /* Null if ctrl-c. */ \ - sim_pc_set ((cpu), (cia)); \ -} while (0) -#define SIM_ENGINE_RESTART_HOOK(sd, cpu, cia) \ -do { \ - sim_pc_set ((cpu), (cia)); \ -} while (0) - #include "sim-base.h" #include "cgen-sim.h" #include "cris-sim.h" @@ -191,6 +174,9 @@ struct _sim_cpu { void* (*make_thread_cpu_data) (SIM_CPU *, void *); size_t thread_cpu_data_size; + /* The register differs, so we dispatch to a CPU-specific function. */ + void (*set_target_thread_data) (SIM_CPU *, USI); + /* CPU-model 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 @@ -222,8 +208,7 @@ struct _sim_cpu { /* The sim_state struct. */ struct sim_state { - sim_cpu *cpu; -#define STATE_CPU(sd, n) (/*&*/ (sd)->cpu) + sim_cpu *cpu[MAX_NR_PROCESSORS]; CGEN_STATE cgen_state; @@ -241,6 +226,4 @@ cris_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), \ /* Default memory size. */ #define CRIS_DEFAULT_MEM_SIZE 0x800000 /* 8M */ -extern device cris_devices; - #endif /* SIM_MAIN_H */