[AArch64] Implement stfiwx
Improves povray performance by ~4%
This commit is contained in:
parent
8bc311ab3c
commit
d3176fe22a
|
@ -51,7 +51,7 @@ void JitArm64::EmitBackpatchRoutine(u32 flags, bool fastmem, bool do_farcode,
|
|||
{
|
||||
|
||||
if (flags & BackPatchInfo::FLAG_STORE &&
|
||||
flags & (BackPatchInfo::FLAG_SIZE_F32 | BackPatchInfo::FLAG_SIZE_F64))
|
||||
flags & (BackPatchInfo::FLAG_SIZE_F32 | BackPatchInfo::FLAG_SIZE_F64 | BackPatchInfo::FLAG_SIZE_F32I))
|
||||
{
|
||||
if (flags & BackPatchInfo::FLAG_SIZE_F32)
|
||||
{
|
||||
|
@ -59,6 +59,11 @@ void JitArm64::EmitBackpatchRoutine(u32 flags, bool fastmem, bool do_farcode,
|
|||
m_float_emit.REV32(8, D0, D0);
|
||||
m_float_emit.STR(32, D0, X28, addr);
|
||||
}
|
||||
else if (flags & BackPatchInfo::FLAG_SIZE_F32I)
|
||||
{
|
||||
m_float_emit.REV32(8, D0, RS);
|
||||
m_float_emit.STR(32, D0, X28, addr);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_float_emit.REV64(8, Q0, RS);
|
||||
|
@ -164,7 +169,7 @@ void JitArm64::EmitBackpatchRoutine(u32 flags, bool fastmem, bool do_farcode,
|
|||
m_float_emit.ABI_PushRegisters(fprs_to_push, X30);
|
||||
|
||||
if (flags & BackPatchInfo::FLAG_STORE &&
|
||||
flags & (BackPatchInfo::FLAG_SIZE_F32 | BackPatchInfo::FLAG_SIZE_F64))
|
||||
flags & (BackPatchInfo::FLAG_SIZE_F32 | BackPatchInfo::FLAG_SIZE_F64 | BackPatchInfo::FLAG_SIZE_F32I))
|
||||
{
|
||||
if (flags & BackPatchInfo::FLAG_SIZE_F32)
|
||||
{
|
||||
|
@ -173,6 +178,12 @@ void JitArm64::EmitBackpatchRoutine(u32 flags, bool fastmem, bool do_farcode,
|
|||
MOVI2R(X30, (u64)&PowerPC::Write_U32);
|
||||
BLR(X30);
|
||||
}
|
||||
else if (flags & BackPatchInfo::FLAG_SIZE_F32I)
|
||||
{
|
||||
m_float_emit.UMOV(32, W0, RS, 0);
|
||||
MOVI2R(X30, (u64)&PowerPC::Write_U32);
|
||||
BLR(X30);
|
||||
}
|
||||
else
|
||||
{
|
||||
MOVI2R(X30, (u64)&PowerPC::Write_U64);
|
||||
|
|
|
@ -245,6 +245,10 @@ void JitArm64::stfXX(UGeckoInstruction inst)
|
|||
update = true;
|
||||
offset_reg = b;
|
||||
break;
|
||||
case 983: // stfiwx
|
||||
flags |= BackPatchInfo::FLAG_SIZE_F32I;
|
||||
offset_reg = b;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 53: // stfsu
|
||||
|
|
|
@ -284,7 +284,7 @@ static GekkoOPTemplate table31[] =
|
|||
{695, &JitArm64::stfXX}, // stfsux
|
||||
{727, &JitArm64::stfXX}, // stfdx
|
||||
{759, &JitArm64::stfXX}, // stfdux
|
||||
{983, &JitArm64::FallBackToInterpreter}, // stfiwx
|
||||
{983, &JitArm64::stfXX}, // stfiwx
|
||||
|
||||
{19, &JitArm64::FallBackToInterpreter}, // mfcr
|
||||
{83, &JitArm64::mfmsr}, // mfmsr
|
||||
|
|
|
@ -19,6 +19,7 @@ struct BackPatchInfo
|
|||
FLAG_REVERSE = (1 << 7),
|
||||
FLAG_EXTEND = (1 << 8),
|
||||
FLAG_ONLY_LOWER = (1 << 9),
|
||||
FLAG_SIZE_F32I = (1 << 10),
|
||||
};
|
||||
|
||||
static u32 GetFlagSize(u32 flags)
|
||||
|
@ -29,7 +30,7 @@ struct BackPatchInfo
|
|||
return 16;
|
||||
if (flags & FLAG_SIZE_32)
|
||||
return 32;
|
||||
if (flags & FLAG_SIZE_F32)
|
||||
if (flags & FLAG_SIZE_F32 || flags & FLAG_SIZE_F32I)
|
||||
return 32;
|
||||
if (flags & FLAG_SIZE_F64)
|
||||
return 64;
|
||||
|
|
Loading…
Reference in New Issue