From 4b2f73774f10ef72e037f7a25c0ce92e2b9bdb6d Mon Sep 17 00:00:00 2001 From: JosJuice Date: Wed, 11 Oct 2023 19:38:46 +0200 Subject: [PATCH] JitArm64: Optimize frsqrte denormal path Now that the normal path is no longer reading X2 and X3, it doesn't matter what the denormal path writes to them. --- Source/Core/Core/PowerPC/JitArm64/JitAsm.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Source/Core/Core/PowerPC/JitArm64/JitAsm.cpp b/Source/Core/Core/PowerPC/JitArm64/JitAsm.cpp index 9771d9118a..fd1693f62a 100644 --- a/Source/Core/Core/PowerPC/JitArm64/JitAsm.cpp +++ b/Source/Core/Core/PowerPC/JitArm64/JitAsm.cpp @@ -333,11 +333,10 @@ void JitArm64::GenerateFrsqrte() // "Normalize" denormal values CLZ(ARM64Reg::X3, ARM64Reg::X3); SUB(ARM64Reg::X4, ARM64Reg::X3, 11); - MOVI2R(ARM64Reg::X2, 0x00C0'0000'0000'0000); - LSLV(ARM64Reg::X4, ARM64Reg::X1, ARM64Reg::X4); - SUB(ARM64Reg::X2, ARM64Reg::X2, ARM64Reg::X3, ArithOption(ARM64Reg::X3, ShiftType::LSL, 52)); - AND(ARM64Reg::X3, ARM64Reg::X4, LogicalImm(Common::DOUBLE_FRAC - 1, 64)); - ORR(ARM64Reg::X1, ARM64Reg::X2, ARM64Reg::X3); + MOVI2R(ARM64Reg::X2, 12); + LSLV(ARM64Reg::X1, ARM64Reg::X1, ARM64Reg::X4); + SUB(ARM64Reg::X3, ARM64Reg::X2, ARM64Reg::X3); + BFI(ARM64Reg::X1, ARM64Reg::X3, 52, 12); SetJumpTarget(normal); UBFX(ARM64Reg::X2, ARM64Reg::X1, 48, 5);