1 /* Main header for the m32r. */
6 #define USING_SIM_BASE_H /* FIXME: quick hack */
8 struct _sim_cpu
; /* FIXME: should be in sim-basics.h */
9 typedef struct _sim_cpu SIM_CPU
;
13 #include "sim-basics.h"
14 #include "cgen-types.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))
28 /* The _sim_cpu struct. */
31 /* sim/common cpu base. */
34 /* Static parts of cgen. */
37 M32R_MISC_PROFILE m32r_misc_profile
;
38 #define CPU_M32R_MISC_PROFILE(cpu) (& (cpu)->m32r_misc_profile)
40 /* CPU specific parts go here.
41 Note that in files that don't need to access these pieces WANT_CPU_FOO
42 won't be defined and thus these parts won't appear. This is ok in the
43 sense that things work. It is a source of bugs though.
44 One has to of course be careful to not take the size of this
45 struct and no structure members accessed in non-cpu specific files can
46 go after here. Oh for a better language. */
47 #if defined (WANT_CPU_M32RBF)
48 M32RBF_CPU_DATA cpu_data
;
49 /* start-sanitize-m32rx */
50 #elif defined (WANT_CPU_M32RXF)
51 M32RXF_CPU_DATA cpu_data
;
52 /* end-sanitize-m32rx */
56 /* The sim_state struct. */
60 #define STATE_CPU(sd, n) (/*&*/ (sd)->cpu)
62 CGEN_STATE cgen_state
;
69 /* Catch address exceptions. */
70 extern SIM_CORE_SIGNAL_FN m32r_core_signal
;
71 #define SIM_CORE_SIGNAL(SD,CPU,CIA,MAP,NR_BYTES,ADDR,TRANSFER,ERROR) \
72 m32r_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), \
75 /* Default memory size. */
76 #define M32R_DEFAULT_MEM_SIZE 0x800000 /* 8M */
78 #endif /* SIM_MAIN_H */