From ebf1ab63b8246afac6b599497d6cbdee1db8035d Mon Sep 17 00:00:00 2001 From: zilmar Date: Sat, 1 Oct 2016 06:43:43 +1000 Subject: [PATCH] [Android] Add another case to AddConstToArmReg --- .../Project64-core/N64System/Recompiler/Arm/ArmOps.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Source/Project64-core/N64System/Recompiler/Arm/ArmOps.cpp b/Source/Project64-core/N64System/Recompiler/Arm/ArmOps.cpp index cf56ec782..ef1fa7656 100644 --- a/Source/Project64-core/N64System/Recompiler/Arm/ArmOps.cpp +++ b/Source/Project64-core/N64System/Recompiler/Arm/ArmOps.cpp @@ -12,8 +12,8 @@ #if defined(__arm__) || defined(_M_ARM) #include -#include #include +#include #include /************************************************************************** @@ -117,6 +117,13 @@ void CArmOps::AddConstToArmReg(ArmReg DestReg, ArmReg SourceReg, uint32_t Const) op.imm8_3_1.opcode3 = 0; AddCode32(op.Hex); } + else if ((Const & 0xFFFF8000) == 0xFFFF8000 || (Const & 0xFFFF0000) == 0) + { + ArmReg TempReg = m_RegWorkingSet.Map_TempReg(Arm_Any, -1, false); + MoveConstToArmReg(TempReg,Const); + AddArmRegToArmReg(DestReg, TempReg, SourceReg); + m_RegWorkingSet.SetArmRegProtected(TempReg,false); + } else { CPU_Message("%s: DestReg = %X Const = %X", __FUNCTION__, DestReg, Const);