mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-08 15:20:45 +01:00
JitArm64: Cram two constants into one register
This commit is contained in:
parent
79f856a8d1
commit
cd027f4091
@ -575,8 +575,8 @@ void JitArm64::fctiwx(UGeckoInstruction inst)
|
||||
m_float_emit.FCVTS(EncodeRegToSingle(VD), EncodeRegToSingle(VD), RoundingMode::Z);
|
||||
}
|
||||
|
||||
m_float_emit.ORR(EncodeRegToDouble(VD), EncodeRegToDouble(VD),
|
||||
EncodeRegToDouble(FPR_CONSTANT_FFF8_0000_0000_0000));
|
||||
m_float_emit.INS(32, EncodeRegToDouble(VD), 1,
|
||||
EncodeRegToDouble(FPR_CONSTANT_FFF8_0000_3F80_0000), 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -121,7 +121,7 @@ void JitArm64::psq_lXX(UGeckoInstruction inst)
|
||||
if (w)
|
||||
{
|
||||
// Set ps1 to 1.0
|
||||
m_float_emit.INS(32, VS, 1, FPR_CONSTANT_0000_0000_3F80_0000, 0);
|
||||
m_float_emit.INS(32, VS, 1, FPR_CONSTANT_FFF8_0000_3F80_0000, 0);
|
||||
}
|
||||
|
||||
const ARM64Reg VS_again = fpr.RW(inst.RS, RegType::Single, true);
|
||||
|
@ -726,6 +726,7 @@ void Arm64FPRCache::GetAllocationOrder()
|
||||
ARM64Reg::Q10,
|
||||
ARM64Reg::Q11,
|
||||
ARM64Reg::Q12,
|
||||
ARM64Reg::Q13,
|
||||
|
||||
// Caller saved
|
||||
ARM64Reg::Q16,
|
||||
|
@ -26,9 +26,8 @@ constexpr Arm64Gen::ARM64Reg PPC_REG = Arm64Gen::ARM64Reg::X29;
|
||||
constexpr Arm64Gen::ARM64Reg DISPATCHER_PC = Arm64Gen::ARM64Reg::W26;
|
||||
|
||||
// FPR constants
|
||||
constexpr Arm64Gen::ARM64Reg FPR_CONSTANT_0000_0000_0000_0000 = Arm64Gen::ARM64Reg::Q13;
|
||||
constexpr Arm64Gen::ARM64Reg FPR_CONSTANT_0000_0000_3F80_0000 = Arm64Gen::ARM64Reg::Q14;
|
||||
constexpr Arm64Gen::ARM64Reg FPR_CONSTANT_FFF8_0000_0000_0000 = Arm64Gen::ARM64Reg::Q15;
|
||||
constexpr Arm64Gen::ARM64Reg FPR_CONSTANT_0000_0000_0000_0000 = Arm64Gen::ARM64Reg::Q14;
|
||||
constexpr Arm64Gen::ARM64Reg FPR_CONSTANT_FFF8_0000_3F80_0000 = Arm64Gen::ARM64Reg::Q15;
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define PPCSTATE_OFF(elem) \
|
||||
|
@ -46,9 +46,8 @@ void JitArm64::GenerateAsm()
|
||||
|
||||
// Generate FPR constants
|
||||
m_float_emit.MOVI(8, EncodeRegToDouble(FPR_CONSTANT_0000_0000_0000_0000), 0);
|
||||
m_float_emit.FMOV(EncodeRegToSingle(FPR_CONSTANT_0000_0000_3F80_0000), 0x70);
|
||||
MOVI2R(ARM64Reg::X30, 0xFFF8'0000'0000'0000ULL);
|
||||
m_float_emit.FMOV(EncodeRegToDouble(FPR_CONSTANT_FFF8_0000_0000_0000), ARM64Reg::X30);
|
||||
MOVI2R(ARM64Reg::X30, 0xFFF8'0000'3F80'0000ULL);
|
||||
m_float_emit.FMOV(EncodeRegToDouble(FPR_CONSTANT_FFF8_0000_3F80_0000), ARM64Reg::X30);
|
||||
|
||||
MOVP2R(PPC_REG, &m_ppc_state);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user