--- np2/i386c/ia32/cpu.h 2004/03/24 14:34:23 1.27 +++ np2/i386c/ia32/cpu.h 2004/06/15 13:50:13 1.30 @@ -1,4 +1,4 @@ -/* $Id: cpu.h,v 1.27 2004/03/24 14:34:23 monaka Exp $ */ +/* $Id: cpu.h,v 1.30 2004/06/15 13:50:13 monaka Exp $ */ /* * Copyright (c) 2002-2003 NONAKA Kimihiro @@ -117,10 +117,6 @@ enum { MAX_PREFIX = 8 }; -enum { - CPU_PREFETCH_QUEUE_LENGTH = 16 -}; - typedef struct { REG32 reg[CPU_REG_NUM]; UINT16 sreg[CPU_SEGREG_NUM]; @@ -157,10 +153,6 @@ typedef struct { descriptor_t ldtr; descriptor_t tr; - BYTE prefetch[CPU_PREFETCH_QUEUE_LENGTH]; - SINT8 prefetch_remain; - UINT8 pad2[3]; - UINT32 adrsmask; UINT32 ovflag; @@ -213,10 +205,11 @@ typedef struct { UINT32 clock; } I386STAT; -typedef struct { /* for ver0.73 */ +typedef struct { BYTE *ext; UINT32 extsize; UINT32 inport; + BYTE *ems[4]; } I386EXT; typedef struct { @@ -243,6 +236,7 @@ extern I386CORE i386core; #define CPU_EXTMEM i386core.e.ext #define CPU_EXTMEMSIZE i386core.e.extsize #define CPU_INPADRS i386core.e.inport +#define CPU_EMSPTR i386core.e.ems extern sigjmp_buf exec_1step_jmpbuf; @@ -454,14 +448,9 @@ void set_eflags(UINT32 new_flags, UINT32 #define CPU_STAT_EXCEPTION_COUNTER_INC() CPU_STATSAVE.cpu_stat.nerror++ #define CPU_STAT_EXCEPTION_COUNTER_CLEAR() CPU_STATSAVE.cpu_stat.nerror = 0 -#define CPU_PREFETCHQ CPU_STATSAVE.cpu_stat.prefetch -#define CPU_PREFETCHQ_REMAIN CPU_STATSAVE.cpu_stat.prefetch_remain - -#if defined(IA32_SUPPORT_PREFETCH_QUEUE) -#define CPU_PREFETCH_CLEAR() CPU_PREFETCHQ_REMAIN = 0 -#else /* !IA32_SUPPORT_PREFETCH_QUEUE */ #define CPU_PREFETCH_CLEAR() -#endif /* IA32_SUPPORT_PREFETCH_QUEUE */ +#define CPU_PREFETCHQ_REMAIN_ADD(d) +#define CPU_PREFETCHQ_REMAIN_SUB(d) #define CPU_MODE_SUPERVISER 0 #define CPU_MODE_USER (1 << 3) @@ -580,9 +569,11 @@ do { \ void ia32_init(void); void ia32_initreg(void); void ia32_setextsize(UINT32 size); +void ia32_setemm(UINT frame, UINT32 addr); void ia32reset(void); void ia32shut(void); +void ia32a20enable(BOOL enable); void ia32(void); void ia32_step(void); void CPUCALL ia32_interrupt(int vect, int soft);