home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / gdb-4.16-base.tgz / gdb-4.16-base.tar / fsf / gdb / sim / h8300 / inst.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-01-04  |  985 b   |  77 lines

  1. #define DEBUG
  2.  
  3. #define H8300_MSIZE (1<<16)
  4.  
  5. /* This value coincides with the default linker script.
  6.    Don't change either without considering the effect on the other.  */
  7. #define H8300H_MSIZE (1<<18)
  8.  
  9. #define CSIZE 1000
  10.  
  11. /* Local register names */
  12. typedef enum
  13. {
  14.   R0, R1, R2, R3, R4, R5, R6, R7,
  15.   R_ZERO,
  16.   R_PC,                
  17.   R_CCR,
  18.   R_HARD_0,            
  19.   R_LAST,
  20. } reg_type;
  21.  
  22.  
  23. /* Structure used to describe addressing */
  24.  
  25. typedef struct
  26. {
  27.   int type;
  28.   int reg;
  29.   int literal;
  30. } ea_type;
  31.  
  32.  
  33.  
  34. typedef struct
  35. {
  36.   ea_type src;
  37.   ea_type dst;
  38.   int opcode;
  39.   int next_pc;
  40.   int oldpc;
  41.   int cycles;
  42. #ifdef DEBUG
  43. struct h8_opcode *op;
  44. #endif
  45. }
  46.  
  47. decoded_inst;
  48.  
  49.  
  50.  
  51. typedef struct
  52. {
  53.   int exception;
  54.   unsigned  int regs[9];
  55.   int pc;
  56.   int ccr;
  57.   
  58.  
  59.   unsigned char *memory;
  60.   unsigned short *cache_idx;
  61.   int cache_top;
  62.   int maximum;
  63.   int csize;
  64.   int mask;
  65.   
  66.   decoded_inst *cache;
  67.   int cycles;
  68.   int insts;
  69.   int ticks;
  70.   int compiles;
  71. #ifdef ADEBUG
  72.   int stats[O_LAST];
  73. #endif
  74. }
  75.  
  76. cpu_state_type;
  77.