[Projec64] Add AndConstToVariable
This commit is contained in:
parent
ae27b59621
commit
0b53e3e584
|
@ -77,6 +77,26 @@ void CArmOps::AddConstToArmReg(ArmReg DestReg, uint32_t Const)
|
||||||
AddConstToArmReg(DestReg, DestReg, Const);
|
AddConstToArmReg(DestReg, DestReg, Const);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CArmOps::AndConstToVariable(void *Variable, const char * VariableName, uint32_t Const)
|
||||||
|
{
|
||||||
|
if (mInItBlock) { g_Notify->BreakPoint(__FILE__, __LINE__); }
|
||||||
|
|
||||||
|
ArmReg TempReg1 = m_RegWorkingSet.Map_TempReg(Arm_Any, -1, false);
|
||||||
|
ArmReg TempReg2 = m_RegWorkingSet.Map_TempReg(Arm_Any, -1, false);
|
||||||
|
if (TempReg1 == Arm_Unknown || TempReg2 == Arm_Unknown)
|
||||||
|
{
|
||||||
|
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
MoveConstToArmReg(TempReg1, (uint32_t)Variable, VariableName);
|
||||||
|
LoadArmRegPointerToArmReg(TempReg2, TempReg1, 0);
|
||||||
|
AndConstToArmReg(TempReg2, TempReg2, Const);
|
||||||
|
StoreArmRegToArmRegPointer(TempReg2, TempReg1, 0);
|
||||||
|
|
||||||
|
m_RegWorkingSet.SetArmRegProtected(TempReg1, false);
|
||||||
|
m_RegWorkingSet.SetArmRegProtected(TempReg2, false);
|
||||||
|
}
|
||||||
|
|
||||||
void CArmOps::AddConstToArmReg(ArmReg DestReg, ArmReg SourceReg, uint32_t Const)
|
void CArmOps::AddConstToArmReg(ArmReg DestReg, ArmReg SourceReg, uint32_t Const)
|
||||||
{
|
{
|
||||||
if (mInItBlock) { g_Notify->BreakPoint(__FILE__,__LINE__); }
|
if (mInItBlock) { g_Notify->BreakPoint(__FILE__,__LINE__); }
|
||||||
|
|
|
@ -159,6 +159,7 @@ protected:
|
||||||
static void AddArmRegToArmReg(ArmReg DestReg, ArmReg SourceReg1, ArmReg SourceReg2);
|
static void AddArmRegToArmReg(ArmReg DestReg, ArmReg SourceReg1, ArmReg SourceReg2);
|
||||||
static void AddConstToArmReg(ArmReg DestReg, uint32_t Const);
|
static void AddConstToArmReg(ArmReg DestReg, uint32_t Const);
|
||||||
static void AddConstToArmReg(ArmReg DestReg, ArmReg SourceReg, uint32_t Const);
|
static void AddConstToArmReg(ArmReg DestReg, ArmReg SourceReg, uint32_t Const);
|
||||||
|
static void AndConstToVariable(void *Variable, const char * VariableName, uint32_t Const);
|
||||||
static void AndArmRegToArmReg(ArmReg DestReg, ArmReg SourceReg);
|
static void AndArmRegToArmReg(ArmReg DestReg, ArmReg SourceReg);
|
||||||
static void BranchLabel8(ArmCompareType CompareType, const char * Label);
|
static void BranchLabel8(ArmCompareType CompareType, const char * Label);
|
||||||
static void BranchLabel20(ArmCompareType CompareType, const char * Label);
|
static void BranchLabel20(ArmCompareType CompareType, const char * Label);
|
||||||
|
|
Loading…
Reference in New Issue