diff options
author | Steve Chamberlain <sac@cygnus> | 1993-06-08 21:16:33 +0000 |
---|---|---|
committer | Steve Chamberlain <sac@cygnus> | 1993-06-08 21:16:33 +0000 |
commit | 7ecaa5af330937f165f413bd968d45965afd49c8 (patch) | |
tree | cc6c6657715fde19f2066cc533c2e68f1c2166fd /sim/h8300/inst.h | |
parent | 357992027a3f9e0562cf2bc79f69fcc180ae35a2 (diff) | |
download | gdb-7ecaa5af330937f165f413bd968d45965afd49c8.zip gdb-7ecaa5af330937f165f413bd968d45965afd49c8.tar.gz gdb-7ecaa5af330937f165f413bd968d45965afd49c8.tar.bz2 |
Rewrite for H8/300-H
Diffstat (limited to 'sim/h8300/inst.h')
-rw-r--r-- | sim/h8300/inst.h | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/sim/h8300/inst.h b/sim/h8300/inst.h new file mode 100644 index 0000000..22914b4 --- /dev/null +++ b/sim/h8300/inst.h @@ -0,0 +1,71 @@ +#define DEBUG + +#define MPOWER 16 +#define MSIZE (1<<MPOWER) +#define CSIZE 1000 +/* Local register names */ +typedef enum +{ + R0, R1, R2, R3, R4, R5, R6, R7, + R_ZERO, + R_PC, + R_CCR, + R_HARD_0, + R_LAST, +} reg_type; + + +/* Structure used to describe addressing */ + +typedef struct +{ + int type; + int reg; + int literal; +} ea_type; + + + +typedef struct +{ + ea_type src; + ea_type dst; + int opcode; + int next_pc; + int oldpc; + int cycles; +#ifdef DEBUG +struct h8_opcode *op; +#endif +} + +decoded_inst; + + + +typedef struct +{ + int exception; + unsigned int regs[9]; + int pc; + int ccr; + + + unsigned char *memory; + unsigned short *cache_idx; + int cache_top; + int maximum; + int csize; + int mask; + + decoded_inst *cache; + int cycles; + int insts; + int ticks; + int compiles; +#ifdef ADEBUG + int stats[O_LAST]; +#endif +} + +cpu_state_type; |