[Project64] Add CArmOps::ProgressItBlock

This commit is contained in:
zilmar 2016-11-22 18:06:50 +11:00
parent 88fc1130c8
commit 28e4ba2e8c
2 changed files with 47 additions and 0 deletions

View File

@ -1535,6 +1535,51 @@ const char * CArmOps::ArmItMaskName(ArmItMask mask)
return "???";
}
void CArmOps::ProgressItBlock ( void )
{
bool itBlockDone = false;
mItBlockInstruction += 1;
if (mItBlockInstruction == 1)
{
if (mItBlockMask == ItMask_None)
{
itBlockDone = true;
}
}
else if (mItBlockInstruction == 2)
{
if (mItBlockMask == ItMask_T || mItBlockMask == ItMask_E)
{
itBlockDone = true;
}
}
else if (mItBlockInstruction == 3)
{
if (mItBlockMask == ItMask_TT || mItBlockMask == ItMask_ET || mItBlockMask == ItMask_TE || mItBlockMask == ItMask_EE)
{
itBlockDone = true;
}
}
else if (mItBlockInstruction == 4)
{
if (mItBlockMask == ItMask_TTT || mItBlockMask == ItMask_ETT || mItBlockMask == ItMask_TET || mItBlockMask == ItMask_EET ||
mItBlockMask == ItMask_TTE || mItBlockMask == ItMask_ETE || mItBlockMask == ItMask_TEE || mItBlockMask == ItMask_EEE)
{
itBlockDone = true;
}
}
else
{
g_Notify->BreakPoint(__FILE__, __LINE__);
}
if (itBlockDone)
{
mInItBlock = false;
mItBlockInstruction = 0;
}
}
void CArmOps::AddCode8(uint8_t value)
{
(*((uint8_t *)(*g_RecompPos)) = (uint8_t)(value));

View File

@ -218,6 +218,8 @@ protected:
static const char * ArmFpuSingleName(ArmFpuSingle Reg);
static const char * ArmItMaskName(ArmItMask mask);
static void ProgressItBlock ( void );
static bool CanThumbCompressConst (uint32_t value);
static uint16_t ThumbCompressConst (uint32_t value);