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
;
12 #include "sim-basics.h"
13 #include "cgen-types.h"
14 #include "m32r-desc.h"
18 /* These must be defined before sim-base.h. */
21 #define SIM_ENGINE_HALT_HOOK(sd, cpu, cia) \
23 if (cpu) /* null if ctrl-c */ \
24 sim_pc_set ((cpu), (cia)); \
26 #define SIM_ENGINE_RESTART_HOOK(sd, cpu, cia) \
28 sim_pc_set ((cpu), (cia)); \
34 #include "opcode/cgen.h"
36 /* The _sim_cpu struct. */
39 /* sim/common cpu base. */
42 /* Static parts of cgen. */
45 M32R_MISC_PROFILE m32r_misc_profile
;
46 #define CPU_M32R_MISC_PROFILE(cpu) (& (cpu)->m32r_misc_profile)
48 /* CPU specific parts go here.
49 Note that in files that don't need to access these pieces WANT_CPU_FOO
50 won't be defined and thus these parts won't appear. This is ok in the
51 sense that things work. It is a source of bugs though.
52 One has to of course be careful to not take the size of this
53 struct and no structure members accessed in non-cpu specific files can
54 go after here. Oh for a better language. */
55 #if defined (WANT_CPU_M32RBF)
56 M32RBF_CPU_DATA cpu_data
;
58 #if defined (WANT_CPU_M32RXF)
59 M32RXF_CPU_DATA cpu_data
;
60 #elif defined (WANT_CPU_M32R2F)
61 M32R2F_CPU_DATA cpu_data
;
65 /* The sim_state struct. */
68 sim_cpu
*cpu
[MAX_NR_PROCESSORS
];
70 CGEN_STATE cgen_state
;
77 /* Catch address exceptions. */
78 extern SIM_CORE_SIGNAL_FN m32r_core_signal
;
79 #define SIM_CORE_SIGNAL(SD,CPU,CIA,MAP,NR_BYTES,ADDR,TRANSFER,ERROR) \
80 m32r_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), \
83 /* Default memory size. */
85 #define M32R_DEFAULT_MEM_SIZE 0x2000000 /* 32M */
87 #define M32R_DEFAULT_MEM_SIZE 0x800000 /* 8M */
90 #endif /* SIM_MAIN_H */