Diff for /np2/i386c/ia32/cpu.h between versions 1.20 and 1.28

version 1.20, 2004/03/05 14:17:35 version 1.28, 2004/03/25 08:51:24
Line 109  enum { Line 109  enum {
 };  };
   
 enum {  enum {
         CPU_DEBUG_REG_NUM = 8          CPU_DEBUG_REG_NUM = 8,
           CPU_DEBUG_REG_INDEX_NUM = 4
 };  };
   
 enum {  enum {
Line 157  typedef struct { Line 158  typedef struct {
         descriptor_t    tr;          descriptor_t    tr;
   
         BYTE            prefetch[CPU_PREFETCH_QUEUE_LENGTH];          BYTE            prefetch[CPU_PREFETCH_QUEUE_LENGTH];
         UINT32          prefetch_remain;          SINT8           prefetch_remain;
           UINT8           pad2[3];
   
         UINT32          adrsmask;          UINT32          adrsmask;
         UINT32          ovflag;          UINT32          ovflag;
Line 174  typedef struct { Line 176  typedef struct {
         UINT8           user_mode;          UINT8           user_mode;
   
         UINT8           hlt;          UINT8           hlt;
         UINT8           pad[3];          UINT8           bp;     /* break point bitmap */
           UINT8           bp_ev;  /* break point event */
           UINT8           pad;
   
         UINT32          pde_base;          UINT32          pde_base;
   
Line 402  do { \ Line 406  do { \
 #define ALL_FLAG        (SZAPC_FLAG|T_FLAG|I_FLAG|D_FLAG|O_FLAG|IOPL_FLAG|NT_FLAG)  #define ALL_FLAG        (SZAPC_FLAG|T_FLAG|I_FLAG|D_FLAG|O_FLAG|IOPL_FLAG|NT_FLAG)
 #define ALL_EFLAG       (ALL_FLAG|RF_FLAG|VM_FLAG|AC_FLAG|VIF_FLAG|VIP_FLAG|ID_FLAG)  #define ALL_EFLAG       (ALL_FLAG|RF_FLAG|VM_FLAG|AC_FLAG|VIF_FLAG|VIP_FLAG|ID_FLAG)
   
 #define REAL_FLAGREG    ((CPU_FLAG & 0xf7ff) | (CPU_OV ? O_FLAG : 0))  #define REAL_FLAGREG    ((CPU_FLAG & 0xf7ff) | (CPU_OV ? O_FLAG : 0) | 2)
 #define REAL_EFLAGREG   ((CPU_EFLAG & 0xfffff7ff) | (CPU_OV ? O_FLAG : 0))  #define REAL_EFLAGREG   ((CPU_EFLAG & 0xfffff7ff) | (CPU_OV ? O_FLAG : 0) | 2)
   
   #if !defined(IA32_DONT_USE_SET_EFLAGS_FUNCTION)
 void set_flags(UINT16 new_flags, UINT16 mask);  void set_flags(UINT16 new_flags, UINT16 mask);
 void set_eflags(UINT32 new_flags, UINT32 mask);  void set_eflags(UINT32 new_flags, UINT32 mask);
   #endif
   
   
 #define CPU_INST_OP32           CPU_STATSAVE.cpu_inst.op_32  #define CPU_INST_OP32           CPU_STATSAVE.cpu_inst.op_32
Line 458  void set_eflags(UINT32 new_flags, UINT32 Line 464  void set_eflags(UINT32 new_flags, UINT32
 #endif  /* IA32_SUPPORT_PREFETCH_QUEUE */  #endif  /* IA32_SUPPORT_PREFETCH_QUEUE */
   
 #define CPU_MODE_SUPERVISER     0  #define CPU_MODE_SUPERVISER     0
 #define CPU_MODE_USER           1  #define CPU_MODE_USER           (1 << 3)
 #define CPU_SET_CPL(cpl) \  #define CPU_SET_CPL(cpl) \
 do { \  do { \
         UINT8 __t = (UINT8)((cpl) & 3); \          UINT8 __t = (UINT8)((cpl) & 3); \
Line 475  do { \ Line 481  do { \
 #define CPU_STI \  #define CPU_STI \
 do { \  do { \
         CPU_FLAG |= I_FLAG; \          CPU_FLAG |= I_FLAG; \
         CPU_TRAP = (CPU_FLAG >> 8) & 1; \          CPU_TRAP = (CPU_FLAG & (I_FLAG|T_FLAG)) == (I_FLAG|T_FLAG) ; \
 } while (/*CONSTCOND*/0)  } while (/*CONSTCOND*/0)
   
 #define CPU_GDTR_LIMIT  CPU_STATSAVE.cpu_sysregs.gdtr_limit  #define CPU_GDTR_LIMIT  CPU_STATSAVE.cpu_sysregs.gdtr_limit
Line 516  do { \ Line 522  do { \
 #define CPU_CR0_NW              (1 << 29)  #define CPU_CR0_NW              (1 << 29)
 #define CPU_CR0_CD              (1 << 30)  #define CPU_CR0_CD              (1 << 30)
 #define CPU_CR0_PG              (1 << 31)  #define CPU_CR0_PG              (1 << 31)
   #define CPU_CR0_ALL             (CPU_CR0_PE|CPU_CR0_MP|CPU_CR0_EM|CPU_CR0_TS|CPU_CR0_ET|CPU_CR0_NE|CPU_CR0_WP|CPU_CR0_AM|CPU_CR0_NW|CPU_CR0_CD|CPU_CR0_PG)
   
 #define CPU_CR3_PD_MASK         0xfffff000  #define CPU_CR3_PD_MASK         0xfffff000
 #define CPU_CR3_PWT             (1 << 3)  #define CPU_CR3_PWT             (1 << 3)
Line 534  do { \ Line 541  do { \
 #define CPU_CR4_OSFXSR          (1 << 9)  #define CPU_CR4_OSFXSR          (1 << 9)
 #define CPU_CR4_OSXMMEXCPT      (1 << 10)  #define CPU_CR4_OSXMMEXCPT      (1 << 10)
   
   /*
    * debug register
    */
   #define CPU_DR(r)               CPU_STATSAVE.cpu_regs.dr[(r)]
   #define CPU_DR6                 CPU_DR(6)
   #define CPU_DR7                 CPU_DR(7)
   
   #define CPU_STAT_BP             CPU_STATSAVE.cpu_stat.bp
   #define CPU_STAT_BP_EVENT       CPU_STATSAVE.cpu_stat.bp_ev
   #define CPU_STAT_BP_EVENT_B(r)  (1 << (r))
   #define CPU_STAT_BP_EVENT_DR    (1 << 4)        /* fault */
   #define CPU_STAT_BP_EVENT_STEP  (1 << 5)        /* as CPU_TRAP */
   #define CPU_STAT_BP_EVENT_TASK  (1 << 6)
   #define CPU_STAT_BP_EVENT_RF    (1 << 7)        /* RF_FLAG */
   
   #define CPU_DR6_B(r)            (1 << (r))
   #define CPU_DR6_BD              (1 << 13)
   #define CPU_DR6_BS              (1 << 14)
   #define CPU_DR6_BT              (1 << 15)
   
   #define CPU_DR7_L(r)            (1 << ((r) * 2))
   #define CPU_DR7_G(r)            (1 << ((r) * 2 + 1))
   #define CPU_DR7_LE              (1 << 8)
   #define CPU_DR7_GE              (1 << 9)
   #define CPU_DR7_GD              (1 << 13)
   #define CPU_DR7_RW(r)           (3 << ((r) * 4 + 16))
   #define CPU_DR7_LEN(r)          (3 << ((r) * 4 + 16 + 2))
   
   #define CPU_DR7_GET_RW(r)       ((CPU_DR7) >> (16 + (r) * 4))
   #define CPU_DR7_RW_CODE         0
   #define CPU_DR7_RW_RO           1
   #define CPU_DR7_RW_IO           2
   #define CPU_DR7_RW_RW           3
   
   #define CPU_DR7_GET_LEN(r)      ((CPU_DR7) >> (16 + 2 + (r) * 4))
   
 void ia32_init(void);  void ia32_init(void);
 void ia32_initreg(void);  void ia32_initreg(void);
Line 541  void ia32_setextsize(UINT32 size); Line 583  void ia32_setextsize(UINT32 size);
   
 void ia32reset(void);  void ia32reset(void);
 void ia32shut(void);  void ia32shut(void);
   void ia32a20enable(BOOL enable);
 void ia32(void);  void ia32(void);
 void ia32withtrap(void);  
 void ia32withdma(void);  
   
 void ia32_step(void);  void ia32_step(void);
 void CPUCALL ia32_interrupt(int vect);  void CPUCALL ia32_interrupt(int vect, int soft);
 void CPUCALL ia32_exception(int vect, int p1, int p2);  void CPUCALL ia32_exception(int vect, int p1, int p2);
   
 void exec_1step(void);  void exec_1step(void);

Removed from v.1.20  
changed lines
  Added in v.1.28


RetroPC.NET-CVS <cvs@retropc.net>