1 /* Main header for the fr30. */
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. */
13 #include "sim-basics.h"
14 #include "cgen-types.h"
15 #include "fr30-desc.h"
19 /* These must be defined before sim-base.h. */
22 #define CIA_GET(cpu) CPU_PC_GET (cpu)
23 #define CIA_SET(cpu,val) CPU_PC_SET ((cpu), (val))
29 /* The _sim_cpu struct. */
32 /* sim/common cpu base. */
35 /* Static parts of cgen. */
38 /* CPU specific parts go here.
39 Note that in files that don't need to access these pieces WANT_CPU_FOO
40 won't be defined and thus these parts won't appear. This is ok in the
41 sense that things work. It is a source of bugs though.
42 One has to of course be careful to not take the size of this
43 struct and no structure members accessed in non-cpu specific files can
44 go after here. Oh for a better language. */
45 #if defined (WANT_CPU_FR30BF)
46 FR30BF_CPU_DATA cpu_data
;
50 /* The sim_state struct. */
54 #define STATE_CPU(sd, n) (/*&*/ (sd)->cpu)
56 CGEN_STATE cgen_state
;
63 /* Catch address exceptions. */
64 extern SIM_CORE_SIGNAL_FN fr30_core_signal
;
65 #define SIM_CORE_SIGNAL(SD,CPU,CIA,MAP,NR_BYTES,ADDR,TRANSFER,ERROR) \
66 fr30_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), \
69 /* Default memory size. */
70 #define FR30_DEFAULT_MEM_SIZE 0x800000 /* 8M */