]>
Commit | Line | Data |
---|---|---|
369fba30 DE |
1 | /* Main header for the m32r. */ |
2 | ||
3 | #define USING_SIM_BASE_H /* FIXME: quick hack */ | |
4 | ||
5 | struct _sim_cpu; /* FIXME: should be in sim-basics.h */ | |
6 | typedef struct _sim_cpu SIM_CPU; | |
7 | ||
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. */ | |
10 | #include "config.h" | |
11 | ||
12 | #include "cgen-types.h" | |
13 | #include "arch.h" /* machine generated */ | |
14 | #include "sim-basics.h" | |
15 | ||
16 | /* These must be defined before sim-base.h. */ | |
17 | typedef SI sim_cia; | |
18 | ||
19 | /* FIXME: Shouldn't be required to define these this early. */ | |
20 | #define SIM_ENGINE_HALT_HOOK(SD, LAST_CPU, CIA) | |
21 | #define SIM_ENGINE_RESTART_HOOK(SD, LAST_CPU, CIA) | |
22 | ||
23 | #include "sim-base.h" | |
24 | #include "cgen-sim.h" | |
25 | /*#include "cgen-mem.h"*/ | |
26 | #include "cgen-trace.h" | |
27 | #include "cpu-opc.h" /* Needed for INSN_NAME. */ | |
28 | #include "cpu-sim.h" | |
29 | ||
30 | #ifdef WANT_CPU_M32R | |
31 | #include "cpu.h" /* machine generated */ | |
32 | #include "decode.h" /* machine generated */ | |
33 | #endif | |
34 | /* start-sanitize-m32rx */ | |
35 | #ifdef WANT_CPU_M32RX | |
36 | #include "cpux.h" /* machine generated */ | |
37 | #include "decodex.h" /* machine generated */ | |
38 | #endif | |
39 | /* end-sanitize-m32rx */ | |
40 | #include "cpuall.h" /* machine generated */ | |
41 | ||
42 | /* Misc. profile data. */ | |
43 | typedef struct { | |
44 | /* nop insn slot filler count */ | |
45 | unsigned int fillnop_count; | |
46 | } M32R_MISC_PROFILE; | |
47 | ||
48 | struct _sim_cpu { | |
49 | sim_cpu_base base; | |
50 | ||
51 | /* Non-machine generated parts of cgen. */ | |
52 | CGEN_CPU cgen_cpu; | |
53 | ||
54 | /* Machine generated and cpu specific parts go here. | |
55 | Note that in files that don't need to access these pieces WANT_CPU_FOO | |
56 | won't be defined and thus these parts won't appear. This is ok. | |
57 | One has to of course be careful to not take the size of this | |
58 | struct, etc. */ | |
59 | #if defined (WANT_CPU_M32R) | |
60 | M32R_CPU_DATA cpu_data; | |
61 | #elif defined (WANT_CPU_M32RX) | |
62 | M32RX_CPU_DATA cpu_data; | |
63 | PARALLEL_EXEC par_exec; | |
64 | #define CPU_PAR_EXEC(cpu) (& (cpu)->par_exec) | |
65 | #endif | |
66 | ||
67 | M32R_MISC_PROFILE m32r_misc_profile; | |
68 | #define CPU_M32R_MISC_PROFILE(cpu) ((cpu)->m32r_misc_profile) | |
69 | }; | |
70 | ||
71 | struct sim_state { | |
72 | sim_cpu *cpu; | |
73 | #define STATE_CPU(sd, n) (/*&*/ (sd)->cpu) | |
74 | ||
75 | CGEN_STATE cgen_state; | |
76 | ||
77 | sim_state_base base; | |
78 | }; | |
79 | ||
80 | /* Default memory size. */ | |
81 | #define M32R_DEFAULT_MEM_SIZE 0x800000 /* 8M */ |