Cycle counts for recompiled blocks now generated at compile time.
This commit is contained in:
parent
087f412d3f
commit
2905c43db8
43 changed files with 1142 additions and 730 deletions
|
|
@ -5,7 +5,7 @@ static int opXCHG_b_a16(uint32_t fetchdat)
|
|||
temp = geteab(); if (abrt) return 1;
|
||||
seteab(getr8(reg)); if (abrt) return 1;
|
||||
setr8(reg, temp);
|
||||
cycles -= ((mod == 3) ? 3 : 5);
|
||||
CLOCK_CYCLES((mod == 3) ? 3 : 5);
|
||||
return 0;
|
||||
}
|
||||
static int opXCHG_b_a32(uint32_t fetchdat)
|
||||
|
|
@ -15,7 +15,7 @@ static int opXCHG_b_a32(uint32_t fetchdat)
|
|||
temp = geteab(); if (abrt) return 1;
|
||||
seteab(getr8(reg)); if (abrt) return 1;
|
||||
setr8(reg, temp);
|
||||
cycles -= ((mod == 3) ? 3 : 5);
|
||||
CLOCK_CYCLES((mod == 3) ? 3 : 5);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -26,7 +26,7 @@ static int opXCHG_w_a16(uint32_t fetchdat)
|
|||
temp = geteaw(); if (abrt) return 1;
|
||||
seteaw(regs[reg].w); if (abrt) return 1;
|
||||
regs[reg].w = temp;
|
||||
cycles -= ((mod == 3) ? 3 : 5);
|
||||
CLOCK_CYCLES((mod == 3) ? 3 : 5);
|
||||
return 0;
|
||||
}
|
||||
static int opXCHG_w_a32(uint32_t fetchdat)
|
||||
|
|
@ -36,7 +36,7 @@ static int opXCHG_w_a32(uint32_t fetchdat)
|
|||
temp = geteaw(); if (abrt) return 1;
|
||||
seteaw(regs[reg].w); if (abrt) return 1;
|
||||
regs[reg].w = temp;
|
||||
cycles -= ((mod == 3) ? 3 : 5);
|
||||
CLOCK_CYCLES((mod == 3) ? 3 : 5);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -47,7 +47,7 @@ static int opXCHG_l_a16(uint32_t fetchdat)
|
|||
temp = geteal(); if (abrt) return 1;
|
||||
seteal(regs[reg].l); if (abrt) return 1;
|
||||
regs[reg].l = temp;
|
||||
cycles -= ((mod == 3) ? 3 : 5);
|
||||
CLOCK_CYCLES((mod == 3) ? 3 : 5);
|
||||
return 0;
|
||||
}
|
||||
static int opXCHG_l_a32(uint32_t fetchdat)
|
||||
|
|
@ -57,7 +57,7 @@ static int opXCHG_l_a32(uint32_t fetchdat)
|
|||
temp = geteal(); if (abrt) return 1;
|
||||
seteal(regs[reg].l); if (abrt) return 1;
|
||||
regs[reg].l = temp;
|
||||
cycles -= ((mod == 3) ? 3 : 5);
|
||||
CLOCK_CYCLES((mod == 3) ? 3 : 5);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -67,7 +67,7 @@ static int opXCHG_AX_BX(uint32_t fetchdat)
|
|||
uint16_t temp = AX;
|
||||
AX = BX;
|
||||
BX = temp;
|
||||
cycles -= 3;
|
||||
CLOCK_CYCLES(3);
|
||||
return 0;
|
||||
}
|
||||
static int opXCHG_AX_CX(uint32_t fetchdat)
|
||||
|
|
@ -75,7 +75,7 @@ static int opXCHG_AX_CX(uint32_t fetchdat)
|
|||
uint16_t temp = AX;
|
||||
AX = CX;
|
||||
CX = temp;
|
||||
cycles -= 3;
|
||||
CLOCK_CYCLES(3);
|
||||
return 0;
|
||||
}
|
||||
static int opXCHG_AX_DX(uint32_t fetchdat)
|
||||
|
|
@ -83,7 +83,7 @@ static int opXCHG_AX_DX(uint32_t fetchdat)
|
|||
uint16_t temp = AX;
|
||||
AX = DX;
|
||||
DX = temp;
|
||||
cycles -= 3;
|
||||
CLOCK_CYCLES(3);
|
||||
return 0;
|
||||
}
|
||||
static int opXCHG_AX_SI(uint32_t fetchdat)
|
||||
|
|
@ -91,7 +91,7 @@ static int opXCHG_AX_SI(uint32_t fetchdat)
|
|||
uint16_t temp = AX;
|
||||
AX = SI;
|
||||
SI = temp;
|
||||
cycles -= 3;
|
||||
CLOCK_CYCLES(3);
|
||||
return 0;
|
||||
}
|
||||
static int opXCHG_AX_DI(uint32_t fetchdat)
|
||||
|
|
@ -99,7 +99,7 @@ static int opXCHG_AX_DI(uint32_t fetchdat)
|
|||
uint16_t temp = AX;
|
||||
AX = DI;
|
||||
DI = temp;
|
||||
cycles -= 3;
|
||||
CLOCK_CYCLES(3);
|
||||
return 0;
|
||||
}
|
||||
static int opXCHG_AX_BP(uint32_t fetchdat)
|
||||
|
|
@ -107,7 +107,7 @@ static int opXCHG_AX_BP(uint32_t fetchdat)
|
|||
uint16_t temp = AX;
|
||||
AX = BP;
|
||||
BP = temp;
|
||||
cycles -= 3;
|
||||
CLOCK_CYCLES(3);
|
||||
return 0;
|
||||
}
|
||||
static int opXCHG_AX_SP(uint32_t fetchdat)
|
||||
|
|
@ -115,7 +115,7 @@ static int opXCHG_AX_SP(uint32_t fetchdat)
|
|||
uint16_t temp = AX;
|
||||
AX = SP;
|
||||
SP = temp;
|
||||
cycles -= 3;
|
||||
CLOCK_CYCLES(3);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -124,7 +124,7 @@ static int opXCHG_EAX_EBX(uint32_t fetchdat)
|
|||
uint32_t temp = EAX;
|
||||
EAX = EBX;
|
||||
EBX = temp;
|
||||
cycles -= 3;
|
||||
CLOCK_CYCLES(3);
|
||||
return 0;
|
||||
}
|
||||
static int opXCHG_EAX_ECX(uint32_t fetchdat)
|
||||
|
|
@ -132,7 +132,7 @@ static int opXCHG_EAX_ECX(uint32_t fetchdat)
|
|||
uint32_t temp = EAX;
|
||||
EAX = ECX;
|
||||
ECX = temp;
|
||||
cycles -= 3;
|
||||
CLOCK_CYCLES(3);
|
||||
return 0;
|
||||
}
|
||||
static int opXCHG_EAX_EDX(uint32_t fetchdat)
|
||||
|
|
@ -140,7 +140,7 @@ static int opXCHG_EAX_EDX(uint32_t fetchdat)
|
|||
uint32_t temp = EAX;
|
||||
EAX = EDX;
|
||||
EDX = temp;
|
||||
cycles -= 3;
|
||||
CLOCK_CYCLES(3);
|
||||
return 0;
|
||||
}
|
||||
static int opXCHG_EAX_ESI(uint32_t fetchdat)
|
||||
|
|
@ -148,7 +148,7 @@ static int opXCHG_EAX_ESI(uint32_t fetchdat)
|
|||
uint32_t temp = EAX;
|
||||
EAX = ESI;
|
||||
ESI = temp;
|
||||
cycles -= 3;
|
||||
CLOCK_CYCLES(3);
|
||||
return 0;
|
||||
}
|
||||
static int opXCHG_EAX_EDI(uint32_t fetchdat)
|
||||
|
|
@ -156,7 +156,7 @@ static int opXCHG_EAX_EDI(uint32_t fetchdat)
|
|||
uint32_t temp = EAX;
|
||||
EAX = EDI;
|
||||
EDI = temp;
|
||||
cycles -= 3;
|
||||
CLOCK_CYCLES(3);
|
||||
return 0;
|
||||
}
|
||||
static int opXCHG_EAX_EBP(uint32_t fetchdat)
|
||||
|
|
@ -164,7 +164,7 @@ static int opXCHG_EAX_EBP(uint32_t fetchdat)
|
|||
uint32_t temp = EAX;
|
||||
EAX = EBP;
|
||||
EBP = temp;
|
||||
cycles -= 3;
|
||||
CLOCK_CYCLES(3);
|
||||
return 0;
|
||||
}
|
||||
static int opXCHG_EAX_ESP(uint32_t fetchdat)
|
||||
|
|
@ -172,7 +172,7 @@ static int opXCHG_EAX_ESP(uint32_t fetchdat)
|
|||
uint32_t temp = EAX;
|
||||
EAX = ESP;
|
||||
ESP = temp;
|
||||
cycles -= 3;
|
||||
CLOCK_CYCLES(3);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -181,7 +181,7 @@ static int opXCHG_EAX_ESP(uint32_t fetchdat)
|
|||
static int opBSWAP_ ## reg(uint32_t fetchdat) \
|
||||
{ \
|
||||
reg = (reg >> 24) | ((reg >> 8) & 0xff00) | ((reg << 8) & 0xff0000) | ((reg << 24) & 0xff000000); \
|
||||
cycles--; \
|
||||
CLOCK_CYCLES(1); \
|
||||
return 0; \
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue