Jit: Some mcrxr optimizations
This commit is contained in:
parent
5ea1cc5406
commit
c70dcf99dd
|
@ -588,8 +588,8 @@ void Jit64::mcrxr(UGeckoInstruction inst)
|
|||
MOV(64, CROffset(inst.CRFD), R(RSCRATCH));
|
||||
|
||||
// Clear XER[0-3]
|
||||
MOV(8, PPCSTATE(xer_ca), Imm8(0));
|
||||
MOV(8, PPCSTATE(xer_so_ov), Imm8(0));
|
||||
static_assert(PPCSTATE_OFF(xer_ca) + 1 == PPCSTATE_OFF(xer_so_ov));
|
||||
MOV(16, PPCSTATE(xer_ca), Imm8(0));
|
||||
}
|
||||
|
||||
void Jit64::crXXX(UGeckoInstruction inst)
|
||||
|
|
|
@ -143,7 +143,7 @@ void JitArm64::mcrxr(UGeckoInstruction inst)
|
|||
LDRB(IndexType::Unsigned, WB, PPC_REG, PPCSTATE_OFF(xer_so_ov));
|
||||
|
||||
// [0 SO OV CA]
|
||||
ADD(WA, WA, WB, ArithOption(WB, ShiftType::LSL, 1));
|
||||
BFI(WA, WB, 1, 2);
|
||||
// [SO OV CA 0] << 3
|
||||
LSL(WA, WA, 4);
|
||||
|
||||
|
@ -151,8 +151,8 @@ void JitArm64::mcrxr(UGeckoInstruction inst)
|
|||
LDR(XB, XB, XA);
|
||||
|
||||
// Clear XER[0-3]
|
||||
STRB(IndexType::Unsigned, ARM64Reg::WZR, PPC_REG, PPCSTATE_OFF(xer_ca));
|
||||
STRB(IndexType::Unsigned, ARM64Reg::WZR, PPC_REG, PPCSTATE_OFF(xer_so_ov));
|
||||
static_assert(PPCSTATE_OFF(xer_ca) + 1 == PPCSTATE_OFF(xer_so_ov));
|
||||
STRH(IndexType::Unsigned, ARM64Reg::WZR, PPC_REG, PPCSTATE_OFF(xer_ca));
|
||||
|
||||
gpr.Unlock(WA);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue