Move some more variables into cpu_state structure. Minor speedup (~2%).
This commit is contained in:
parent
a65411466e
commit
c664682758
43 changed files with 801 additions and 810 deletions
|
|
@ -3,7 +3,7 @@ static int opCMPXCHG_b_a16(uint32_t fetchdat)
|
|||
uint8_t temp, temp2 = AL;
|
||||
if (!is486)
|
||||
{
|
||||
cpu_state.pc = oldpc;
|
||||
cpu_state.pc = cpu_state.oldpc;
|
||||
x86illegal();
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -21,7 +21,7 @@ static int opCMPXCHG_b_a32(uint32_t fetchdat)
|
|||
uint8_t temp, temp2 = AL;
|
||||
if (!is486)
|
||||
{
|
||||
cpu_state.pc = oldpc;
|
||||
cpu_state.pc = cpu_state.oldpc;
|
||||
x86illegal();
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -40,7 +40,7 @@ static int opCMPXCHG_w_a16(uint32_t fetchdat)
|
|||
uint16_t temp, temp2 = AX;
|
||||
if (!is486)
|
||||
{
|
||||
cpu_state.pc = oldpc;
|
||||
cpu_state.pc = cpu_state.oldpc;
|
||||
x86illegal();
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -58,7 +58,7 @@ static int opCMPXCHG_w_a32(uint32_t fetchdat)
|
|||
uint16_t temp, temp2 = AX;
|
||||
if (!is486)
|
||||
{
|
||||
cpu_state.pc = oldpc;
|
||||
cpu_state.pc = cpu_state.oldpc;
|
||||
x86illegal();
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -77,7 +77,7 @@ static int opCMPXCHG_l_a16(uint32_t fetchdat)
|
|||
uint32_t temp, temp2 = EAX;
|
||||
if (!is486)
|
||||
{
|
||||
cpu_state.pc = oldpc;
|
||||
cpu_state.pc = cpu_state.oldpc;
|
||||
x86illegal();
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -95,7 +95,7 @@ static int opCMPXCHG_l_a32(uint32_t fetchdat)
|
|||
uint32_t temp, temp2 = EAX;
|
||||
if (!is486)
|
||||
{
|
||||
cpu_state.pc = oldpc;
|
||||
cpu_state.pc = cpu_state.oldpc;
|
||||
x86illegal();
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -114,17 +114,17 @@ static int opCMPXCHG8B_a16(uint32_t fetchdat)
|
|||
uint32_t temp, temp_hi, temp2 = EAX, temp2_hi = EDX;
|
||||
if (!is486)
|
||||
{
|
||||
cpu_state.pc = oldpc;
|
||||
cpu_state.pc = cpu_state.oldpc;
|
||||
x86illegal();
|
||||
return 0;
|
||||
}
|
||||
fetch_ea_16(fetchdat);
|
||||
temp = geteal();
|
||||
temp_hi = readmeml(easeg, eaaddr + 4); if (abrt) return 0;
|
||||
temp_hi = readmeml(easeg, cpu_state.eaaddr + 4); if (abrt) return 0;
|
||||
if (EAX == temp && EDX == temp_hi)
|
||||
{
|
||||
seteal(EBX);
|
||||
writememl(easeg, eaaddr+4, ECX);
|
||||
writememl(easeg, cpu_state.eaaddr+4, ECX);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -145,17 +145,17 @@ static int opCMPXCHG8B_a32(uint32_t fetchdat)
|
|||
uint32_t temp, temp_hi, temp2 = EAX, temp2_hi = EDX;
|
||||
if (!is486)
|
||||
{
|
||||
cpu_state.pc = oldpc;
|
||||
cpu_state.pc = cpu_state.oldpc;
|
||||
x86illegal();
|
||||
return 0;
|
||||
}
|
||||
fetch_ea_32(fetchdat);
|
||||
temp = geteal();
|
||||
temp_hi = readmeml(easeg, eaaddr + 4); if (abrt) return 0;
|
||||
temp_hi = readmeml(easeg, cpu_state.eaaddr + 4); if (abrt) return 0;
|
||||
if (EAX == temp && EDX == temp_hi)
|
||||
{
|
||||
seteal(EBX);
|
||||
writememl(easeg, eaaddr+4, ECX);
|
||||
writememl(easeg, cpu_state.eaaddr+4, ECX);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -177,7 +177,7 @@ static int opXADD_b_a16(uint32_t fetchdat)
|
|||
uint8_t temp;
|
||||
if (!is486)
|
||||
{
|
||||
cpu_state.pc = oldpc;
|
||||
cpu_state.pc = cpu_state.oldpc;
|
||||
x86illegal();
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -194,7 +194,7 @@ static int opXADD_b_a32(uint32_t fetchdat)
|
|||
uint8_t temp;
|
||||
if (!is486)
|
||||
{
|
||||
cpu_state.pc = oldpc;
|
||||
cpu_state.pc = cpu_state.oldpc;
|
||||
x86illegal();
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -212,7 +212,7 @@ static int opXADD_w_a16(uint32_t fetchdat)
|
|||
uint16_t temp;
|
||||
if (!is486)
|
||||
{
|
||||
cpu_state.pc = oldpc;
|
||||
cpu_state.pc = cpu_state.oldpc;
|
||||
x86illegal();
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -229,7 +229,7 @@ static int opXADD_w_a32(uint32_t fetchdat)
|
|||
uint16_t temp;
|
||||
if (!is486)
|
||||
{
|
||||
cpu_state.pc = oldpc;
|
||||
cpu_state.pc = cpu_state.oldpc;
|
||||
x86illegal();
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -247,7 +247,7 @@ static int opXADD_l_a16(uint32_t fetchdat)
|
|||
uint32_t temp;
|
||||
if (!is486)
|
||||
{
|
||||
cpu_state.pc = oldpc;
|
||||
cpu_state.pc = cpu_state.oldpc;
|
||||
x86illegal();
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -264,7 +264,7 @@ static int opXADD_l_a32(uint32_t fetchdat)
|
|||
uint32_t temp;
|
||||
if (!is486)
|
||||
{
|
||||
cpu_state.pc = oldpc;
|
||||
cpu_state.pc = cpu_state.oldpc;
|
||||
x86illegal();
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue