Added Pentium and Pentium MMX emulation.
This commit is contained in:
parent
aecf865c2c
commit
13226a2bd4
13 changed files with 1536 additions and 16 deletions
|
|
@ -109,6 +109,69 @@ static int opCMPXCHG_l_a32(uint32_t fetchdat)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int opCMPXCHG8B_a16(uint32_t fetchdat)
|
||||
{
|
||||
uint32_t temp, temp_hi, temp2 = EAX, temp2_hi = EDX;
|
||||
if (!is486)
|
||||
{
|
||||
pc = oldpc;
|
||||
x86illegal();
|
||||
return 0;
|
||||
}
|
||||
fetch_ea_16(fetchdat);
|
||||
temp = geteal();
|
||||
temp_hi = readmeml(easeg, eaaddr + 4); if (abrt) return 0;
|
||||
if (EAX == temp && EDX == temp_hi)
|
||||
{
|
||||
seteal(EBX);
|
||||
writememl(easeg, eaaddr+4, ECX);
|
||||
}
|
||||
else
|
||||
{
|
||||
EAX = temp;
|
||||
EDX = temp_hi;
|
||||
}
|
||||
if (abrt) return 0;
|
||||
flags_rebuild();
|
||||
if (temp == temp2 && temp_hi == temp2_hi)
|
||||
flags |= Z_FLAG;
|
||||
else
|
||||
flags &= ~Z_FLAG;
|
||||
cycles -= (mod == 3) ? 6 : 10;
|
||||
return 0;
|
||||
}
|
||||
static int opCMPXCHG8B_a32(uint32_t fetchdat)
|
||||
{
|
||||
uint32_t temp, temp_hi, temp2 = EAX, temp2_hi = EDX;
|
||||
if (!is486)
|
||||
{
|
||||
pc = oldpc;
|
||||
x86illegal();
|
||||
return 0;
|
||||
}
|
||||
fetch_ea_32(fetchdat);
|
||||
temp = geteal();
|
||||
temp_hi = readmeml(easeg, eaaddr + 4); if (abrt) return 0;
|
||||
if (EAX == temp && EDX == temp_hi)
|
||||
{
|
||||
seteal(EBX);
|
||||
writememl(easeg, eaaddr+4, ECX);
|
||||
}
|
||||
else
|
||||
{
|
||||
EAX = temp;
|
||||
EDX = temp_hi;
|
||||
}
|
||||
if (abrt) return 0;
|
||||
flags_rebuild();
|
||||
if (temp == temp2 && temp_hi == temp2_hi)
|
||||
flags |= Z_FLAG;
|
||||
else
|
||||
flags &= ~Z_FLAG;
|
||||
cycles -= (mod == 3) ? 6 : 10;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int opXADD_b_a16(uint32_t fetchdat)
|
||||
{
|
||||
uint8_t temp;
|
||||
|
|
|
|||
Loading…
Reference in a new issue