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) (cpu)->regs.h_pc
21 #define CIA_SET(cpu,val) (cpu)->regs.h_pc = (val)
23 #define TRAP_SYSCALL 0
35 /* match with definition in gx-translate.c! */
36 typedef struct tgx_cpu_regs
38 unsigned int h_pc
; /* program counter */
39 signed int h_gr
[16]; /* general registers */
40 unsigned int h_cr
[16]; /* control registers */
41 long long h_accum
; /* accumulator */
42 unsigned h_lock
; /* lock */
45 /* match with definition in gx-translate.c! */
46 typedef struct tgx_syscall_data
59 /* match with definition in gx-translate.c! */
60 typedef struct tgx_callbacks
62 unsigned (*load
)(unsigned pc
, unsigned addr
);
63 void (*store
)(unsigned pc
, unsigned addr
, unsigned data
);
64 signed char (*load1
)(unsigned pc
, unsigned addr
);
65 void (*store1
)(unsigned pc
, unsigned addr
, signed char data
);
66 signed short (*load2
)(unsigned pc
, unsigned addr
);
67 void (*store2
)(unsigned pc
, unsigned addr
, signed short data
);
68 void (*syscall
)(tgx_syscall_data
* data
);
81 #define STATE_CPU(sd, n) (/*&*/ (sd)->cpu)
86 /* Default memory size. */
87 #define M32R_DEFAULT_MEM_SIZE 0x800000 /* 8M */
91 /* Register access fns. These look up the current mach and call the
92 appropriate handler. */
93 SI
h_gr_get (SIM_CPU
*, UINT
);
94 void h_gr_set (SIM_CPU
*, UINT
, SI
);
This page took 0.032451 seconds and 4 git commands to generate.