Initial commit of dynamic recompiler.
Various CPU changes to support dynamic recompiler.
This commit is contained in:
parent
17cae8a2d7
commit
4676daade4
52 changed files with 3740 additions and 1139 deletions
|
|
@ -3,11 +3,11 @@ static int opINT3(uint32_t fetchdat)
|
|||
if ((cr0 & 1) && (eflags & VM_FLAG) && (IOPL != 3))
|
||||
{
|
||||
x86gpf(NULL,0);
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
x86_int_sw(3);
|
||||
cycles -= (is486) ? 44 : 59;
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int opINT(uint32_t fetchdat)
|
||||
|
|
@ -18,12 +18,44 @@ static int opINT(uint32_t fetchdat)
|
|||
if ((cr0 & 1) && (eflags & VM_FLAG) && (IOPL != 3))
|
||||
{
|
||||
x86gpf(NULL,0);
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
temp = getbytef();
|
||||
if (temp == 0x10 && AH == 0xe) pclog("INT %02X : %04X %04X %04X %04X %c %04X:%04X\n", temp, AX, BX, CX, DX, (AL < 32) ? ' ' : AL, CS, pc);
|
||||
// /*if (temp == 0x10 && AH == 0xe) */pclog("INT %02X : %04X %04X %04X %04X %c %04X:%04X\n", temp, AX, BX, CX, DX, (AL < 32) ? ' ' : AL, CS, pc);
|
||||
// if (CS == 0x0028 && pc == 0xC03813C0)
|
||||
// output = 3;
|
||||
/* if (pc == 0x8028009A)
|
||||
output = 3;
|
||||
if (pc == 0x80282B6F)
|
||||
{
|
||||
__times++;
|
||||
if (__times == 2)
|
||||
fatal("WRONG\n");
|
||||
}
|
||||
if (pc == 0x802809CE)
|
||||
fatal("RIGHT\n");*/
|
||||
// if (CS == 0x0028 && pc == 0x80037FE9)
|
||||
// output = 3;
|
||||
//if (CS == 0x9087 && pc == 0x3763)
|
||||
// fatal("Here\n");
|
||||
//if (CS==0x9087 && pc == 0x0850)
|
||||
// output = 1;
|
||||
|
||||
/* if (output && pc == 0x80033008)
|
||||
{
|
||||
__times++;
|
||||
if (__times == 2)
|
||||
fatal("WRONG\n");
|
||||
}*/
|
||||
/* if (output && pc == 0x80D8)
|
||||
{
|
||||
__times++;
|
||||
if (__times == 2)
|
||||
fatal("RIGHT\n");
|
||||
}*/
|
||||
|
||||
x86_int_sw(temp);
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int opINTO(uint32_t fetchdat)
|
||||
|
|
@ -31,12 +63,13 @@ static int opINTO(uint32_t fetchdat)
|
|||
if ((cr0 & 1) && (eflags & VM_FLAG) && (IOPL != 3))
|
||||
{
|
||||
x86gpf(NULL,0);
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
if (VF_SET())
|
||||
{
|
||||
oldpc = pc;
|
||||
x86_int_sw(4);
|
||||
return 1;
|
||||
}
|
||||
cycles -= 3;
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue