1 /* Main header for the m32r. */
3 #define USING_SIM_BASE_H /* FIXME: quick hack */
5 struct _sim_cpu
; /* FIXME: should be in sim-basics.h */
6 typedef struct _sim_cpu SIM_CPU
;
8 /* sim-basics.h includes config.h but cgen-types.h must be included before
9 sim-basics.h and cgen-types.h needs config.h. */
14 #include "cgen-types.h"
16 #include "sim-basics.h"
18 /* These must be defined before sim-base.h. */
21 #define CIA_GET(cpu) CPU_PC_GET (cpu)
22 #define CIA_SET(cpu,val) CPU_PC_SET ((cpu), (val))
26 #include "cgen-scache.h"
28 #include "cgen-trace.h"
32 /* The _sim_cpu struct. */
35 /* sim/common cpu base. */
38 /* Static parts of cgen. */
41 M32R_MISC_PROFILE m32r_misc_profile
;
42 #define CPU_M32R_MISC_PROFILE(cpu) (& (cpu)->m32r_misc_profile)
44 /* CPU specific parts go here.
45 Note that in files that don't need to access these pieces WANT_CPU_FOO
46 won't be defined and thus these parts won't appear. This is ok in the
47 sense that things work. It is a source of bugs though.
48 One has to of course be careful to not take the size of this
49 struct and no structure members accessed in non-cpu specific files can
50 go after here. Oh for a better language. */
51 #if defined (WANT_CPU_M32RBF)
52 M32RBF_CPU_DATA cpu_data
;
53 /* start-sanitize-m32rx */
54 #elif defined (WANT_CPU_M32RXF)
55 M32RXF_CPU_DATA cpu_data
;
56 /* end-sanitize-m32rx */
60 /* The sim_state struct. */
64 #define STATE_CPU(sd, n) (/*&*/ (sd)->cpu)
66 CGEN_STATE cgen_state
;
73 /* Catch address exceptions. */
74 extern SIM_CORE_SIGNAL_FN m32r_core_signal
;
75 #define SIM_CORE_SIGNAL(SD,CPU,CIA,MAP,NR_BYTES,ADDR,TRANSFER,ERROR) \
76 m32r_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), \
79 /* Default memory size. */
80 #define M32R_DEFAULT_MEM_SIZE 0x800000 /* 8M */