Jit64: Simplify dcbz.
This commit is contained in:
parent
ef0dcfe558
commit
2925a5b219
|
@ -368,43 +368,37 @@ void Jit64::dcbz(UGeckoInstruction inst)
|
|||
MOV(32, R(RSCRATCH), gpr.R(b));
|
||||
if (a)
|
||||
ADD(32, R(RSCRATCH), gpr.R(a));
|
||||
|
||||
if (!UReg_MSR(MSR).DR)
|
||||
{
|
||||
// If address translation is turned off, just call the general-case code.
|
||||
AND(32, R(RSCRATCH), Imm32(~31));
|
||||
MOV(32, M(&PC), Imm32(jit->js.compilerPC));
|
||||
BitSet32 registersInUse = CallerSavedRegistersInUse();
|
||||
ABI_PushRegistersAndAdjustStack(registersInUse, 0);
|
||||
ABI_CallFunctionR((void*)&PowerPC::ClearCacheLine, RSCRATCH);
|
||||
ABI_PopRegistersAndAdjustStack(registersInUse, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (UReg_MSR(MSR).DR)
|
||||
{
|
||||
// Perform lookup to see if we can use fast path.
|
||||
MOV(32, R(RSCRATCH2), R(RSCRATCH));
|
||||
SHR(32, R(RSCRATCH), Imm8(PowerPC::BAT_INDEX_SHIFT));
|
||||
TEST(32, MScaled(RSCRATCH, SCALE_4, (u32)(u64)PowerPC::dbat_table), Imm32(2));
|
||||
SHR(32, R(RSCRATCH2), Imm8(PowerPC::BAT_INDEX_SHIFT));
|
||||
TEST(32, MScaled(RSCRATCH2, SCALE_4, (u32)(u64)PowerPC::dbat_table), Imm32(2));
|
||||
FixupBranch slow = J_CC(CC_Z, true);
|
||||
|
||||
// Fast path: compute full address, then zero out 32 bytes of memory.
|
||||
AND(32, R(RSCRATCH2), Imm8(~31));
|
||||
PXOR(XMM0, R(XMM0));
|
||||
MOVAPS(MComplex(RMEM, RSCRATCH2, SCALE_1, 0), XMM0);
|
||||
MOVAPS(MComplex(RMEM, RSCRATCH2, SCALE_1, 16), XMM0);
|
||||
MOVAPS(MComplex(RMEM, RSCRATCH, SCALE_1, 0), XMM0);
|
||||
MOVAPS(MComplex(RMEM, RSCRATCH, SCALE_1, 16), XMM0);
|
||||
|
||||
// Slow path: mask the address, then call the general-case code.
|
||||
// Slow path: call the general-case code.
|
||||
SwitchToFarCode();
|
||||
SetJumpTarget(slow);
|
||||
AND(32, R(RSCRATCH2), Imm32(~31));
|
||||
}
|
||||
MOV(32, M(&PC), Imm32(jit->js.compilerPC));
|
||||
BitSet32 registersInUse = CallerSavedRegistersInUse();
|
||||
ABI_PushRegistersAndAdjustStack(registersInUse, 0);
|
||||
ABI_CallFunctionR(&PowerPC::ClearCacheLine, RSCRATCH2);
|
||||
ABI_CallFunctionR(&PowerPC::ClearCacheLine, RSCRATCH);
|
||||
ABI_PopRegistersAndAdjustStack(registersInUse, 0);
|
||||
|
||||
if (UReg_MSR(MSR).DR)
|
||||
{
|
||||
FixupBranch end = J(true);
|
||||
SwitchToNearCode();
|
||||
SetJumpTarget(end);
|
||||
}
|
||||
}
|
||||
|
||||
void Jit64::stX(UGeckoInstruction inst)
|
||||
|
|
Loading…
Reference in New Issue