Merge pull request #12123 from JosJuice/jit-mcrxr
Jit: Some mcrxr optimizations
This commit is contained in:
commit
1df685b2d7
|
@ -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)
|
||||
|
|
|
@ -144,7 +144,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, 2));
|
||||
BFI(WA, WB, 1, 2);
|
||||
// [SO OV CA 0] << 3
|
||||
LSL(WA, WA, 4);
|
||||
|
||||
|
@ -152,8 +152,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