| version 1.1, 2003/12/08 00:55:31 | version 1.12, 2004/03/23 15:29:34 | 
| Line 30 | Line 30 | 
 | #ifndef IA32_CPU_INTERFACE_H__ | #ifndef IA32_CPU_INTERFACE_H__ | 
 | #define IA32_CPU_INTERFACE_H__ | #define IA32_CPU_INTERFACE_H__ | 
 |  |  | 
| #if 0           // このあたりも compiler.hへ | #if !defined(QWORD_CONST) | 
| #include "compiler.h" | #define QWORD_CONST(v)  v ## ULL | 
|  | #define SQWORD_CONST(v) v ## LL | 
| #include <assert.h> |  | 
| #include <stdarg.h> |  | 
|  |  | 
| #include "memory.h" |  | 
| #include "nevent.h" |  | 
| #include "iobridge.h" |  | 
|  |  | 
| #include "bios.h" |  | 
| #include "cpuio.h" |  | 
| #include "dmac.h" |  | 
|  |  | 
| #if defined(_DEBUG) |  | 
| #define ASSERT(v)       assert(v) |  | 
| #define VERBOSE(v)      ia32_warning v |  | 
| #else |  | 
| #define ASSERT(v) |  | 
| #define VERBOSE(v) |  | 
| #endif |  | 
 | #endif | #endif | 
 |  |  | 
| // --> あとで common.hへ | #define CPU_isEI                (CPU_FLAG & I_FLAG) | 
| #ifndef INLINE | #define CPU_isDI                (!CPU_isEI) | 
| #define INLINE |  | 
| #endif |  | 
 |  |  | 
| #if 1                   // これ SINT64/UINT64 を作ること | #define CPU_INITIALIZE()                i386c_initialize() | 
| typedef unsigned __int64        QWORD; | #define CPU_DEINITIALIZE() | 
| typedef signed __int64          SQWORD; | #define CPU_RESET()                     ia32reset() | 
| #else | #define CPU_CLEARPREFETCH()             CPU_PREFETCH_CLEAR() | 
| typedef unsigned long long      QWORD; | #define CPU_INTERRUPT(vect, soft)       ia32_interrupt(vect, soft) | 
| typedef signed long long        SQWORD; | #define CPU_EXEC()                      ia32() | 
| #endif | #define CPU_EXECV30()                   ia32() | 
|  | #define CPU_SHUT()                      ia32shut() | 
| typedef signed char             SBYTE; | #define CPU_SETEXTSIZE(size)            ia32_setextsize((UINT32)(size) << 20) | 
| typedef signed short            SWORD; | #define CPU_SETEMM(frame, addr) | 
| typedef signed int              SDWORD; |  | 
|  | #define cpu_memorywrite(a,v)    i286_memorywrite(a,v) | 
| #if 0 | #define cpu_memorywrite_b(a,v)  i286_memorywrite(a,v) | 
| #define I286_AL         CPU_AL | #define cpu_memorywrite_w(a,v)  i286_memorywrite_w(a,v) | 
| #define I286_CL         CPU_CL | #define cpu_memorywrite_d(a,v)  i286_memorywrite_d(a,v) | 
| #define I286_DL         CPU_DL | #define cpu_memoryread(a)       i286_memoryread(a) | 
| #define I286_BL         CPU_BL | #define cpu_memoryread_b(a)     i286_memoryread(a) | 
| #define I286_AH         CPU_AH | #define cpu_memoryread_w(a)     i286_memoryread_w(a) | 
| #define I286_CH         CPU_CH | #define cpu_memoryread_d(a)     i286_memoryread_d(a) | 
| #define I286_DH         CPU_DH |  | 
| #define I286_BH         CPU_BH |  | 
|  |  | 
| #define I286_AX         CPU_AX |  | 
| #define I286_CX         CPU_CX |  | 
| #define I286_DX         CPU_DX |  | 
| #define I286_BX         CPU_BX |  | 
| #define I286_SP         CPU_SP |  | 
| #define I286_BP         CPU_BP |  | 
| #define I286_SI         CPU_SI |  | 
| #define I286_DI         CPU_DI |  | 
| #define I286_IP         CPU_IP |  | 
|  |  | 
| #define I286_EAX        CPU_EAX |  | 
| #define I286_ECX        CPU_ECX |  | 
| #define I286_EDX        CPU_EDX |  | 
| #define I286_EBX        CPU_EBX |  | 
| #define I286_ESP        CPU_ESP |  | 
| #define I286_EBP        CPU_EBP |  | 
| #define I286_ESI        CPU_ESI |  | 
| #define I286_EDI        CPU_EDI |  | 
| #define I286_EIP        CPU_EIP |  | 
|  |  | 
| #define I286_ES         CPU_ES |  | 
| #define I286_CS         CPU_CS |  | 
| #define I286_SS         CPU_SS |  | 
| #define I286_DS         CPU_DS |  | 
| #define I286_FS         CPU_FS |  | 
| #define I286_GS         CPU_GS |  | 
|  |  | 
| #define I286_EFLAG      CPU_EFLAG |  | 
| #define I286_FLAG       CPU_FLAG |  | 
| #define I286_FLAGL      CPU_FLAGL |  | 
| #define I286_FLAGH      CPU_FLAGH |  | 
| #define I286_TRAP       CPU_TRAP |  | 
| #define I286_INPORT     CPU_INPORT |  | 
| #define I286_OV         CPU_OV |  | 
| #define i286s           cpu_stat |  | 
| #endif |  | 
 |  |  | 
| #define CPU_isDI        (!(CPU_FLAG & I_FLAG)) | #define cpu_memoryread_region(a,p,l)    memp_read(a,p,l) | 
| #define CPU_isEI        (CPU_FLAG & I_FLAG) | #define cpu_memorywrite_region(a,p,l)   memp_write(a,p,l) | 
 |  |  | 
| #define CPU_INITIALIZE()        i386c_initialize() | void i386c_initialize(void); | 
| #define CPU_RESET()             ia32reset() |  | 
| #define CPU_CLEARPREFETCH() |  | 
| #define CPU_INTERRUPT(a)        ia32_interrupt(a) |  | 
| #define CPU_EXEC()              ia32() |  | 
| #define CPU_EXECV30()           ia32() |  | 
|  |  | 
| // #define      CPU_WITHTRAP()          ia32withtrap() |  | 
| // #define      CPU_WITHDMA()           ia32withdma() |  | 
| // #define      CPU_STEP()              ia32_step() |  | 
|  |  | 
| void FASTCALL msgbox_str(char *msg); |  | 
| void FASTCALL msgbox_mem(DWORD no); |  | 
| void put_cpuinfo(void); |  | 
 |  |  | 
 | #endif  /* IA32_CPU_INTERFACE_H__ */ | #endif  /* IA32_CPU_INTERFACE_H__ */ |