mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
Merge pull request #9960 from JosJuice/jitarm64-mtfsb1x
JitArm64: Implement mtfsb1x
This commit is contained in:
commit
c86c02e46b
@ -120,6 +120,7 @@ public:
|
||||
void mcrfs(UGeckoInstruction inst);
|
||||
void mffsx(UGeckoInstruction inst);
|
||||
void mtfsb0x(UGeckoInstruction inst);
|
||||
void mtfsb1x(UGeckoInstruction inst);
|
||||
|
||||
// LoadStore
|
||||
void lXX(UGeckoInstruction inst);
|
||||
|
@ -788,3 +788,31 @@ void JitArm64::mtfsb0x(UGeckoInstruction inst)
|
||||
if (inst.CRBD >= 29)
|
||||
UpdateRoundingMode();
|
||||
}
|
||||
|
||||
void JitArm64::mtfsb1x(UGeckoInstruction inst)
|
||||
{
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITSystemRegistersOff);
|
||||
FALLBACK_IF(inst.Rc);
|
||||
|
||||
u32 mask = 0x80000000 >> inst.CRBD;
|
||||
|
||||
ARM64Reg WA = gpr.GetReg();
|
||||
|
||||
LDR(IndexType::Unsigned, WA, PPC_REG, PPCSTATE_OFF(fpscr));
|
||||
if (mask & FPSCR_ANY_X)
|
||||
{
|
||||
ARM64Reg WB = gpr.GetReg();
|
||||
TST(WA, LogicalImm(mask, 32));
|
||||
ORR(WB, WA, LogicalImm(1 << 31, 32));
|
||||
CSEL(WA, WA, WB, CCFlags::CC_NEQ);
|
||||
gpr.Unlock(WB);
|
||||
}
|
||||
ORR(WA, WA, LogicalImm(mask, 32));
|
||||
STR(IndexType::Unsigned, WA, PPC_REG, PPCSTATE_OFF(fpscr));
|
||||
|
||||
gpr.Unlock(WA);
|
||||
|
||||
if (inst.CRBD >= 29)
|
||||
UpdateRoundingMode();
|
||||
}
|
||||
|
@ -317,7 +317,7 @@ constexpr std::array<GekkoOPTemplate, 15> table63{{
|
||||
{64, &JitArm64::mcrfs}, // mcrfs
|
||||
{583, &JitArm64::mffsx}, // mffsx
|
||||
{70, &JitArm64::mtfsb0x}, // mtfsb0x
|
||||
{38, &JitArm64::FallBackToInterpreter}, // mtfsb1x
|
||||
{38, &JitArm64::mtfsb1x}, // mtfsb1x
|
||||
{134, &JitArm64::FallBackToInterpreter}, // mtfsfix
|
||||
{711, &JitArm64::FallBackToInterpreter}, // mtfsfx
|
||||
}};
|
||||
|
Loading…
Reference in New Issue
Block a user