* gas/mmix/list-pseudoints.l: Adjust for changes in gas section
[deliverable/binutils-gdb.git] / sim / h8300 / inst.h
CommitLineData
c906108c
SS
1#define DEBUG
2
3/* These define the size of main memory for the simulator.
4
5 Note the size of main memory for the H8/300H is only 256k. Keeping it
6 small makes the simulator run much faster and consume less memory.
7
8 The linker knows about the limited size of the simulator's main memory
9 on the H8/300H (via the h8300h.sc linker script). So if you change
10 H8300H_MSIZE, be sure to fix the linker script too.
11
12 Also note that there's a separate "eightbit" area aside from main
13 memory. For simplicity, the simulator assumes any data memory reference
14 outside of main memory refers to the eightbit area (in theory, this
15 can only happen when simulating H8/300H programs). We make no attempt
16 to catch overlapping addresses, wrapped addresses, etc etc. */
17#define H8300_MSIZE (1<<16)
a8cdafbd
AV
18
19/* avolkov:
20 Next 2 macros are ugly for any workstation, but while they're work.
21 Memory size MUST be configurable.
22 */
23#define H8300H_MSIZE (1<<18)
24#define H8300S_MSIZE (1<<24)
c906108c
SS
25
26#define CSIZE 1000
27
28/* Local register names */
29typedef enum
30{
31 R0, R1, R2, R3, R4, R5, R6, R7,
32 R_ZERO,
33 R_PC,
34 R_CCR,
fc974602 35 R_EXR,
c906108c
SS
36 R_HARD_0,
37 R_LAST,
38} reg_type;
39
40
41/* Structure used to describe addressing */
42
43typedef struct
44{
45 int type;
46 int reg;
47 int literal;
48} ea_type;
49
50
51
52typedef struct
53{
54 ea_type src;
55 ea_type dst;
56 int opcode;
57 int next_pc;
58 int oldpc;
59 int cycles;
60#ifdef DEBUG
61struct h8_opcode *op;
62#endif
63}
64decoded_inst;
65
66enum h8300_sim_state {
67 SIM_STATE_RUNNING, SIM_STATE_EXITED, SIM_STATE_SIGNALLED, SIM_STATE_STOPPED
68};
69
70typedef struct
71{
72 enum h8300_sim_state state;
73 int exception;
74 unsigned int regs[9];
75 int pc;
76 int ccr;
fc974602 77 int exr;
c906108c
SS
78
79 unsigned char *memory;
80 unsigned char *eightbit;
81 unsigned short *cache_idx;
82 int cache_top;
83 int maximum;
84 int csize;
85 int mask;
86
87 decoded_inst *cache;
88 int cycles;
89 int insts;
90 int ticks;
91 int compiles;
92#ifdef ADEBUG
93 int stats[O_LAST];
94#endif
95}
96cpu_state_type;
This page took 0.131258 seconds and 4 git commands to generate.