[Android] Add another case to AddConstToArmReg

This commit is contained in:
zilmar 2016-10-01 06:43:43 +10:00
parent 4121511cf2
commit ebf1ab63b8
1 changed files with 8 additions and 1 deletions

View File

@ -12,8 +12,8 @@
#if defined(__arm__) || defined(_M_ARM)
#include <Project64-core/N64System/SystemGlobals.h>
#include <Project64-core/N64System/Recompiler/Arm/ArmOps.h>
#include <Project64-core/N64System/Recompiler/RecompilerCodeLog.h>
#include <Project64-core/N64System/Recompiler/Arm/ArmOps.h>
#include <Project64-core/N64System/Recompiler/Arm/ArmOpCode.h>
/**************************************************************************
@ -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);