diff options
author | Stan Shebs <shebs@codesourcery.com> | 1999-04-16 01:35:26 +0000 |
---|---|---|
committer | Stan Shebs <shebs@codesourcery.com> | 1999-04-16 01:35:26 +0000 |
commit | c906108c21474dfb4ed285bcc0ac6fe02cd400cc (patch) | |
tree | a0015aa5cedc19ccbab307251353a41722a3ae13 /sim/h8500/inst.h | |
parent | cd946cff9ede3f30935803403f06f6ed30cad136 (diff) | |
download | gdb-c906108c21474dfb4ed285bcc0ac6fe02cd400cc.zip gdb-c906108c21474dfb4ed285bcc0ac6fe02cd400cc.tar.gz gdb-c906108c21474dfb4ed285bcc0ac6fe02cd400cc.tar.bz2 |
Initial creation of sourceware repositorygdb-4_18-branchpoint
Diffstat (limited to 'sim/h8500/inst.h')
-rw-r--r-- | sim/h8500/inst.h | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/sim/h8500/inst.h b/sim/h8500/inst.h new file mode 100644 index 0000000..328ca94 --- /dev/null +++ b/sim/h8500/inst.h @@ -0,0 +1,101 @@ +#define DEBUG + +#define H8500_MSIZE (8*64*1024) +#define CSIZE 1000 + + +union rtype + { + unsigned long l; + unsigned short s[2]; + unsigned char *c; + }; + + +/* Local register names */ +typedef enum +{ + R0, R1, R2, R3, R4, R5, R6, R7, + R_SR, /* 8 */ + R_PC, /* 9 */ + R_BR, /* 10 */ + R_BP, /* 11 */ + R_CP, /* 14 */ + R_DP, /* 13 */ + R_EP, /* 12 */ + R_TP, /* 15 */ + R_HARD_0, /* 16 */ + R_HARD8_0, /* 17 */ + R_LAST, +} reg_type; + + + + +typedef struct +{ + fastref type; + union + { + int code; + unsigned char *bptr; + unsigned short *wptr; + unsigned long *lptr; + unsigned char **segptr; + union rtype *rptr; + + } + reg; + int literal; + union + { + unsigned char **segreg; + unsigned short *wptr; + union rtype *rptr; + } + r2; +} + +ea_type; + + + +typedef struct +{ + ea_type srca; + ea_type srcb; + ea_type dst; + fastref opcode; + fastref flags; + int next_pc; + int oldpc; + int cycles; +#ifdef DEBUG + h8500_opcode_info *op; +#endif +} + +decoded_inst; + + + +typedef struct +{ + int exception; + union rtype regs[20]; + + + + unsigned char *memory; + unsigned short *cache_idx; + int cache_top; + int maximum; + int csize; + decoded_inst *cache; + int cycles; + int insts; + int ticks; + int compiles; +} + +cpu_state_type; |