[Project64] Add CArmOps::OrConstToVariable
This commit is contained in:
parent
e1e82546bb
commit
7ea5418168
|
@ -721,6 +721,27 @@ void CArmOps::OrConstToArmReg(ArmReg DestReg, ArmReg SourceReg, uint32_t value)
|
|||
}
|
||||
}
|
||||
|
||||
void CArmOps::OrConstToVariable(void * Variable, const char * VariableName, uint32_t value)
|
||||
{
|
||||
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);
|
||||
OrConstToArmReg(TempReg2, TempReg2, value);
|
||||
StoreArmRegToArmRegPointer(TempReg2, TempReg1, 0);
|
||||
|
||||
m_RegWorkingSet.SetArmRegProtected(TempReg1, false);
|
||||
m_RegWorkingSet.SetArmRegProtected(TempReg2, false);
|
||||
}
|
||||
|
||||
void CArmOps::MulF32(ArmFpuSingle DestReg, ArmFpuSingle SourceReg1, ArmFpuSingle SourceReg2)
|
||||
{
|
||||
if (mInItBlock) { g_Notify->BreakPoint(__FILE__,__LINE__); }
|
||||
|
|
|
@ -185,6 +185,7 @@ protected:
|
|||
static void MoveVariableToFloatReg(void * Variable, const char * VariableName, ArmFpuSingle reg);
|
||||
static void OrArmRegToArmReg(ArmReg DestReg, ArmReg SourceReg1, ArmReg SourceReg2, uint32_t shift);
|
||||
static void OrConstToArmReg(ArmReg DestReg, ArmReg SourceReg, uint32_t value);
|
||||
static void OrConstToVariable(void * Variable, const char * VariableName, uint32_t value);
|
||||
static void MulF32(ArmFpuSingle DestReg, ArmFpuSingle SourceReg1, ArmFpuSingle SourceReg2);
|
||||
static void PushArmReg(uint16_t Registers);
|
||||
static void PopArmReg(uint16_t Registers);
|
||||
|
|
Loading…
Reference in New Issue