From e42cb0f2c7ca7b7b1eec2c5485a19976d827288c Mon Sep 17 00:00:00 2001 From: zilmar Date: Tue, 22 Nov 2016 17:52:04 +1100 Subject: [PATCH] [Project64] Fix up usage of AndArmRegToArmReg --- Source/Project64-core/N64System/Recompiler/Arm/ArmOps.cpp | 2 +- .../N64System/Recompiler/Arm/ArmRecompilerOps.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/Project64-core/N64System/Recompiler/Arm/ArmOps.cpp b/Source/Project64-core/N64System/Recompiler/Arm/ArmOps.cpp index 6fd88e240..1d5fb60dc 100644 --- a/Source/Project64-core/N64System/Recompiler/Arm/ArmOps.cpp +++ b/Source/Project64-core/N64System/Recompiler/Arm/ArmOps.cpp @@ -1011,7 +1011,7 @@ void CArmOps::TestVariable(uint32_t Const, void * Variable, const char * Variabl MoveVariableToArmReg(Variable,VariableName, TempReg1); MoveConstToArmReg(TempReg2, Const); - AndArmRegToArmReg(TempReg1,TempReg2); + AndArmRegToArmReg(TempReg1, TempReg1, TempReg2); CompareArmRegToArmReg(TempReg1,TempReg2); m_RegWorkingSet.SetArmRegProtected(TempReg1,false); diff --git a/Source/Project64-core/N64System/Recompiler/Arm/ArmRecompilerOps.cpp b/Source/Project64-core/N64System/Recompiler/Arm/ArmRecompilerOps.cpp index 46141bc6d..af8c065e8 100644 --- a/Source/Project64-core/N64System/Recompiler/Arm/ArmRecompilerOps.cpp +++ b/Source/Project64-core/N64System/Recompiler/Arm/ArmRecompilerOps.cpp @@ -1718,7 +1718,7 @@ void CArmRecompilerOps::JAL() LoadArmRegPointerToArmReg(Arm_R1, Arm_R0, 0); MoveConstToArmReg(Arm_R2, 0xF0000000); MoveConstToArmReg(Arm_R3, (uint32_t)(m_Opcode.target << 2)); - AndArmRegToArmReg(Arm_R1, Arm_R2); + AndArmRegToArmReg(Arm_R1, Arm_R1, Arm_R2); AddArmRegToArmReg(Arm_R1, Arm_R3, Arm_R1); StoreArmRegToArmRegPointer(Arm_R1, Arm_R0, 0); @@ -4163,10 +4163,10 @@ void CArmRecompilerOps::CompileCop1Test() ArmReg TempReg2 = m_RegWorkingSet.Map_TempReg(Arm_Any, -1, false); MoveVariableToArmReg(&g_Reg->STATUS_REGISTER, "STATUS_REGISTER", TempReg1); MoveConstToArmReg(TempReg2, STATUS_CU1, "STATUS_CU1"); - AndArmRegToArmReg(TempReg1, TempReg2); + AndArmRegToArmReg(TempReg1, TempReg1, TempReg2); CompareArmRegToConst(TempReg1, 0); - m_RegWorkingSet.SetArmRegProtected(TempReg1,false); - m_RegWorkingSet.SetArmRegProtected(TempReg2,false); + m_RegWorkingSet.SetArmRegProtected(TempReg1, false); + m_RegWorkingSet.SetArmRegProtected(TempReg2, false); CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, CExitInfo::COP1_Unuseable, ArmBranch_Equal); m_RegWorkingSet.SetFpuBeenUsed(true); }