Merge pull request #12123 from JosJuice/jit-mcrxr

Jit: Some mcrxr optimizations
This commit is contained in:
Mai 2023-11-28 19:32:47 +01:00 committed by GitHub
commit 1df685b2d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -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)

View File

@ -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);
}