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. */
20 #define CIA_GET(cpu) 0 /* FIXME:(CPU_CGEN_HW (cpu)->h_pc) */
21 #define CIA_SET(cpu,val) 0 /* FIXME:(CPU_CGEN_HW (cpu)->h_pc = (val)) */
23 /* FIXME: Shouldn't be required to define these this early. */
24 #define SIM_ENGINE_HALT_HOOK(SD, LAST_CPU, CIA)
25 #define SIM_ENGINE_RESTART_HOOK(SD, LAST_CPU, CIA)
27 /* Catch address exceptions. */
28 #define SIM_CORE_SIGNAL(SD,CPU,CIA,MAP,NR_BYTES,ADDR,TRANSFER,ERROR) \
29 m32r_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), \
34 /*#include "cgen-mem.h"*/
35 #include "cgen-trace.h"
38 /* Function to catch address exceptions. */
39 extern SIM_CORE_SIGNAL_FN m32r_core_signal
;
45 /* start-sanitize-m32rx */
50 /* end-sanitize-m32rx */
53 /* The _sim_cpu struct. */
58 /* Static parts of cgen. */
61 M32R_MISC_PROFILE m32r_misc_profile
;
62 #define CPU_M32R_MISC_PROFILE(cpu) ((cpu)->m32r_misc_profile)
64 /* CPU specific parts go here.
65 Note that in files that don't need to access these pieces WANT_CPU_FOO
66 won't be defined and thus these parts won't appear. This is ok.
67 One has to of course be careful to not take the size of this
68 struct and no structure members accessed in non-cpu specific files can
70 #if defined (WANT_CPU_M32R)
71 M32R_CPU_DATA cpu_data
;
72 /* start-sanitize-m32rx */
73 #elif defined (WANT_CPU_M32RX)
74 M32RX_CPU_DATA cpu_data
;
75 /* end-sanitize-m32rx */
79 /* The sim_state struct. */
83 #define STATE_CPU(sd, n) (/*&*/ (sd)->cpu)
85 CGEN_STATE cgen_state
;
92 /* Default memory size. */
93 #define M32R_DEFAULT_MEM_SIZE 0x800000 /* 8M */
95 /* Register access fns. These look up the current mach and call the
96 appropriate handler. */
97 SI
h_gr_get (SIM_CPU
*, UINT
);
98 void h_gr_set (SIM_CPU
*, UINT
, SI
);