From 67c65831bc43a24d39421911041e155bb1858c81 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Sat, 7 Sep 2013 00:35:12 +0000 Subject: [PATCH] [ARM] Make fnabsx and ps_nabs quicker. Sleep deprivation got the better of me. --- .../Src/PowerPC/JitArm32/JitArm_FloatingPoint.cpp | 5 +---- .../Core/Core/Src/PowerPC/JitArm32/JitArm_Paired.cpp | 11 +++-------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/Source/Core/Core/Src/PowerPC/JitArm32/JitArm_FloatingPoint.cpp b/Source/Core/Core/Src/PowerPC/JitArm32/JitArm_FloatingPoint.cpp index 02a48740ce..2295809b3f 100644 --- a/Source/Core/Core/Src/PowerPC/JitArm32/JitArm_FloatingPoint.cpp +++ b/Source/Core/Core/Src/PowerPC/JitArm32/JitArm_FloatingPoint.cpp @@ -60,11 +60,8 @@ void JitArm::fnabsx(UGeckoInstruction inst) ARMReg vD = fpr.R0(inst.FD, false); ARMReg V0 = fpr.GetReg(); - // XXX: Could be done quicker VABS(vD, vB); - VMOV(V0, vD); - VSUB(vD, vD, V0); - VSUB(vD, vD, V0); + VNEG(vD, vD); fpr.Unlock(V0); if (inst.Rc) Helper_UpdateCR1(vD); diff --git a/Source/Core/Core/Src/PowerPC/JitArm32/JitArm_Paired.cpp b/Source/Core/Core/Src/PowerPC/JitArm32/JitArm_Paired.cpp index 4f4751c02f..a5f7d1a1de 100644 --- a/Source/Core/Core/Src/PowerPC/JitArm32/JitArm_Paired.cpp +++ b/Source/Core/Core/Src/PowerPC/JitArm32/JitArm_Paired.cpp @@ -355,15 +355,10 @@ void JitArm::ps_nabs(UGeckoInstruction inst) ARMReg vD1 = fpr.R1(d, false); ARMReg V0 = fpr.GetReg(); - // XXX: Could be done quicker VABS(vD0, vB0); - VMOV(V0, vD0); - VSUB(vD0, vD0, V0); - VSUB(vD0, vD0, V0); + VNEG(vD0, vD0); VABS(vD1, vB1); - VMOV(V0, vD1); - VSUB(vD1, vD1, V0); - VSUB(vD1, vD1, V0); - + VNEG(vD1, vD1); + fpr.Unlock(V0); }