xref: /netbsd-src/external/gpl3/gdb.old/dist/sim/m32r/sim-main.h (revision 8b657b0747480f8989760d71343d6dd33f8d4cf9)
1a5a4af3bSchristos /* Main header for the m32r.  */
2a5a4af3bSchristos 
3a5a4af3bSchristos #ifndef SIM_MAIN_H
4a5a4af3bSchristos #define SIM_MAIN_H
5a5a4af3bSchristos 
6*e5cb852cSchristos /* This is a global setting.  Different cpu families can't mix-n-match -scache
7*e5cb852cSchristos    and -pbb.  However some cpu families may use -simple while others use
8*e5cb852cSchristos    one of -scache/-pbb.  */
9*e5cb852cSchristos #define WITH_SCACHE_PBB 1
10*e5cb852cSchristos 
11a5a4af3bSchristos #include "symcat.h"
12a5a4af3bSchristos #include "sim-basics.h"
13a5a4af3bSchristos #include "cgen-types.h"
14a5a4af3bSchristos #include "m32r-desc.h"
15a5a4af3bSchristos #include "m32r-opc.h"
16a5a4af3bSchristos #include "arch.h"
17a5a4af3bSchristos #include "sim-base.h"
18a5a4af3bSchristos #include "cgen-sim.h"
19a5a4af3bSchristos #include "m32r-sim.h"
20a5a4af3bSchristos #include "opcode/cgen.h"
21a5a4af3bSchristos 
22a5a4af3bSchristos /* The _sim_cpu struct.  */
23a5a4af3bSchristos 
24a5a4af3bSchristos struct _sim_cpu {
25a5a4af3bSchristos   /* sim/common cpu base.  */
26a5a4af3bSchristos   sim_cpu_base base;
27a5a4af3bSchristos 
28a5a4af3bSchristos   /* Static parts of cgen.  */
29a5a4af3bSchristos   CGEN_CPU cgen_cpu;
30a5a4af3bSchristos 
31a5a4af3bSchristos   M32R_MISC_PROFILE m32r_misc_profile;
32a5a4af3bSchristos #define CPU_M32R_MISC_PROFILE(cpu) (& (cpu)->m32r_misc_profile)
33a5a4af3bSchristos 
34a5a4af3bSchristos   /* CPU specific parts go here.
35a5a4af3bSchristos      Note that in files that don't need to access these pieces WANT_CPU_FOO
36a5a4af3bSchristos      won't be defined and thus these parts won't appear.  This is ok in the
37a5a4af3bSchristos      sense that things work.  It is a source of bugs though.
38a5a4af3bSchristos      One has to of course be careful to not take the size of this
39a5a4af3bSchristos      struct and no structure members accessed in non-cpu specific files can
40a5a4af3bSchristos      go after here.  Oh for a better language.  */
41a5a4af3bSchristos #if defined (WANT_CPU_M32RBF)
42a5a4af3bSchristos   M32RBF_CPU_DATA cpu_data;
43a5a4af3bSchristos #endif
44a5a4af3bSchristos #if defined (WANT_CPU_M32RXF)
45a5a4af3bSchristos   M32RXF_CPU_DATA cpu_data;
46a5a4af3bSchristos #elif defined (WANT_CPU_M32R2F)
47a5a4af3bSchristos   M32R2F_CPU_DATA cpu_data;
48a5a4af3bSchristos #endif
49a5a4af3bSchristos };
50a5a4af3bSchristos 
51a5a4af3bSchristos /* Misc.  */
52a5a4af3bSchristos 
53a5a4af3bSchristos /* Catch address exceptions.  */
54a5a4af3bSchristos extern SIM_CORE_SIGNAL_FN m32r_core_signal;
55a5a4af3bSchristos #define SIM_CORE_SIGNAL(SD,CPU,CIA,MAP,NR_BYTES,ADDR,TRANSFER,ERROR) \
56a5a4af3bSchristos m32r_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), \
57a5a4af3bSchristos 		  (TRANSFER), (ERROR))
58a5a4af3bSchristos 
59a5a4af3bSchristos #endif /* SIM_MAIN_H */
60