--- np2/i286x/i286xs.cpp 2003/10/16 17:57:28 1.1 +++ np2/i286x/i286xs.cpp 2004/02/18 20:11:36 1.6 @@ -1,9 +1,7 @@ #include "compiler.h" -#include "nevent.h" -#include "i286.h" +#include "cpucore.h" #include "i286x.h" #include "i286xadr.h" -#include "memory.h" #include "i286x.mcr" #include "i286xea.mcr" @@ -1402,7 +1400,7 @@ I286 div_ea8(void) { movzx ebp, byte ptr I286_REG[eax] GET_NEXTPRE2 jmp divcheck - MEMORY_EA8(22) + MEMORY_EA8(17) movzx ebp, byte ptr I286_MEM[ecx] jmp divcheck EXTMEM_EA8 @@ -1434,7 +1432,7 @@ I286 idiv_ea8(void) { movsx ebp, byte ptr I286_REG[eax] GET_NEXTPRE2 jmp idivcheck - MEMORY_EA8(25) + MEMORY_EA8(20) movsx ebp, byte ptr I286_MEM[ecx] jmp idivcheck EXTMEM_EA8 @@ -1577,7 +1575,7 @@ I286 imul_ea16(void) { I286 div_ea16(void) { __asm { - PREPART_EA16(17) + PREPART_EA16(22) movzx ebp, word ptr I286_REG[eax*2] GET_NEXTPRE2 jmp divcheck @@ -1610,7 +1608,7 @@ I286 div_ea16(void) { I286 idiv_ea16(void) { __asm { - PREPART_EA16(20) + PREPART_EA16(25) movsx ebp, word ptr I286_REG[eax*2] GET_NEXTPRE2 jmp idivcheck @@ -1794,13 +1792,18 @@ I286 call_far_ea16(void) { lea ecx, [edi + ebp] call i286_memoryread_w mov I286_CS, ax - and eax, 0000ffffh + movzx eax, ax + test byte ptr (I286_MSW), MSW_PE + jne short call_far_pe shl eax, 4 // make segreg - mov CS_BASE, eax +call_far_base: mov CS_BASE, eax RESET_XPREFETCH ret - align 4 - register_eareg16: + +call_far_pe: push offset call_far_base + jmp i286x_selector + +register_eareg16: INT_NUM(6) } } @@ -1839,13 +1842,18 @@ I286 jmp_far_ea16(void) { lea ecx, [edi + ebp] call i286_memoryread_w mov I286_CS, ax - and eax, 0000ffffh + movzx eax, ax + test byte ptr (I286_MSW), MSW_PE + jne short jmp_far_pe shl eax, 4 // make segreg - mov CS_BASE, eax +jmp_far_base: mov CS_BASE, eax RESET_XPREFETCH ret - align 4 - register_eareg16: + +jmp_far_pe: push offset jmp_far_base + jmp i286x_selector + +register_eareg16: INT_NUM(6) } }