Core: Clean up CExitInfo::EXIT_REASON enum
This commit is contained in:
parent
524f56eda7
commit
17b78bc705
|
@ -382,7 +382,7 @@ void CArmRecompilerOps::Compile_Branch(BRANCH_COMPARE CompareType, bool Link)
|
|||
CPU_Message("CompileSystemCheck 12");
|
||||
CompileSystemCheck(FallInfo->TargetPC, m_Section->m_Jump.RegSet);
|
||||
ResetRegProtection();
|
||||
FallInfo->ExitReason = CExitInfo::Normal_NoSysCheck;
|
||||
FallInfo->ExitReason = ExitReason_NormalNoSysCheck;
|
||||
FallInfo->JumpPC = (uint32_t)-1;
|
||||
}
|
||||
}
|
||||
|
@ -552,7 +552,7 @@ void CArmRecompilerOps::Compile_BranchLikely(BRANCH_COMPARE CompareType, bool Li
|
|||
}
|
||||
|
||||
LinkJump(m_Section->m_Cont);
|
||||
CompileExit(m_CompilePC, m_CompilePC + 8, m_Section->m_Cont.RegSet, CExitInfo::Normal);
|
||||
CompileExit(m_CompilePC, m_CompilePC + 8, m_Section->m_Cont.RegSet, ExitReason_Normal);
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
@ -1913,7 +1913,7 @@ void CArmRecompilerOps::JAL()
|
|||
bool bCheck = TargetPC <= m_CompilePC;
|
||||
UpdateCounters(m_RegWorkingSet, bCheck, true);
|
||||
|
||||
CompileExit((uint32_t)-1, (uint32_t)-1, m_RegWorkingSet, bCheck ? CExitInfo::Normal : CExitInfo::Normal_NoSysCheck);
|
||||
CompileExit((uint32_t)-1, (uint32_t)-1, m_RegWorkingSet, bCheck ? ExitReason_Normal : ExitReason_NormalNoSysCheck);
|
||||
}
|
||||
m_PipelineStage = PIPELINE_STAGE_END_BLOCK;
|
||||
}
|
||||
|
@ -2864,7 +2864,7 @@ void CArmRecompilerOps::SPECIAL_JR()
|
|||
|
||||
if (R4300iInstruction(m_CompilePC, m_Opcode.Value).DelaySlotEffectsCompare(DelaySlot.Value))
|
||||
{
|
||||
CompileExit(m_CompilePC, (uint32_t)-1, m_RegWorkingSet, CExitInfo::Normal);
|
||||
CompileExit(m_CompilePC, (uint32_t)-1, m_RegWorkingSet, ExitReason_Normal);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2889,7 +2889,7 @@ void CArmRecompilerOps::SPECIAL_JR()
|
|||
m_RegWorkingSet.SetArmRegProtected(ValueTempReg, false);
|
||||
}
|
||||
m_RegWorkingSet.SetArmRegProtected(PCTempReg, false);
|
||||
CompileExit((uint32_t)-1, (uint32_t)-1, m_RegWorkingSet, CExitInfo::Normal);
|
||||
CompileExit((uint32_t)-1, (uint32_t)-1, m_RegWorkingSet, ExitReason_Normal);
|
||||
if (m_Section->m_JumpSection)
|
||||
{
|
||||
m_Section->GenerateSectionLinkage();
|
||||
|
@ -2968,7 +2968,7 @@ void CArmRecompilerOps::SPECIAL_JALR()
|
|||
|
||||
if (R4300iInstruction(m_CompilePC, m_Opcode.Value).DelaySlotEffectsCompare(DelaySlot.Value))
|
||||
{
|
||||
CompileExit(m_CompilePC, (uint32_t)-1, m_RegWorkingSet, CExitInfo::Normal);
|
||||
CompileExit(m_CompilePC, (uint32_t)-1, m_RegWorkingSet, ExitReason_Normal);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2980,7 +2980,7 @@ void CArmRecompilerOps::SPECIAL_JALR()
|
|||
StoreArmRegToArmRegPointer(ArmRegRs, TempRegPC, 0);
|
||||
m_RegWorkingSet.SetArmRegProtected(ArmRegRs, false);
|
||||
m_RegWorkingSet.SetArmRegProtected(TempRegPC, false);
|
||||
CompileExit((uint32_t)-1, (uint32_t)-1, m_RegWorkingSet, CExitInfo::Normal);
|
||||
CompileExit((uint32_t)-1, (uint32_t)-1, m_RegWorkingSet, ExitReason_Normal);
|
||||
if (m_Section->m_JumpSection)
|
||||
{
|
||||
m_Section->GenerateSectionLinkage();
|
||||
|
@ -2996,7 +2996,7 @@ void CArmRecompilerOps::SPECIAL_JALR()
|
|||
|
||||
void CArmRecompilerOps::SPECIAL_SYSCALL()
|
||||
{
|
||||
CompileExit(m_CompilePC, (uint32_t)-1, m_RegWorkingSet, CExitInfo::DoSysCall);
|
||||
CompileExit(m_CompilePC, (uint32_t)-1, m_RegWorkingSet, ExitReason_DoSysCall);
|
||||
m_PipelineStage = PIPELINE_STAGE_END_BLOCK;
|
||||
}
|
||||
|
||||
|
@ -4022,7 +4022,7 @@ void CArmRecompilerOps::COP0_CO_ERET()
|
|||
CallFunction((void *)arm_compiler_COP0_CO_ERET, "arm_compiler_COP0_CO_ERET");
|
||||
|
||||
UpdateCounters(m_RegWorkingSet, true, true);
|
||||
CompileExit(m_CompilePC, (uint32_t)-1, m_RegWorkingSet, CExitInfo::Normal);
|
||||
CompileExit(m_CompilePC, (uint32_t)-1, m_RegWorkingSet, ExitReason_Normal);
|
||||
m_PipelineStage = PIPELINE_STAGE_END_BLOCK;
|
||||
}
|
||||
|
||||
|
@ -4759,7 +4759,7 @@ void CArmRecompilerOps::CompileCop1Test()
|
|||
CompareArmRegToConst(TempReg1, 0);
|
||||
m_RegWorkingSet.SetArmRegProtected(TempReg1, false);
|
||||
m_RegWorkingSet.SetArmRegProtected(TempReg2, false);
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, CExitInfo::COP1_Unuseable, ArmBranch_Equal);
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, ExitReason_COP1Unuseable, ArmBranch_Equal);
|
||||
m_RegWorkingSet.SetFpuBeenUsed(true);
|
||||
}
|
||||
|
||||
|
@ -5251,7 +5251,7 @@ void CArmRecompilerOps::SyncRegState(const CRegInfo & SyncTo)
|
|||
}
|
||||
}
|
||||
|
||||
void CArmRecompilerOps::CompileExit(uint32_t JumpPC, uint32_t TargetPC, CRegInfo &ExitRegSet, CExitInfo::EXIT_REASON reason)
|
||||
void CArmRecompilerOps::CompileExit(uint32_t JumpPC, uint32_t TargetPC, CRegInfo &ExitRegSet, ExitReason reason)
|
||||
{
|
||||
m_RegWorkingSet = ExitRegSet;
|
||||
for (int32_t i = 0; i < 16; i++)
|
||||
|
@ -5267,22 +5267,22 @@ void CArmRecompilerOps::CompileExit(uint32_t JumpPC, uint32_t TargetPC, CRegInfo
|
|||
MoveConstToArmReg(Arm_R2, (uint32_t)&g_Reg->m_PROGRAM_COUNTER, "PROGRAM_COUNTER");
|
||||
StoreArmRegToArmRegPointer(Arm_R1, Arm_R2, 0);
|
||||
|
||||
UpdateCounters(ExitRegSet, TargetPC <= JumpPC && JumpPC != -1, reason == CExitInfo::Normal);
|
||||
UpdateCounters(ExitRegSet, TargetPC <= JumpPC && JumpPC != -1, reason == ExitReason_Normal);
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateCounters(ExitRegSet, false, reason == CExitInfo::Normal);
|
||||
UpdateCounters(ExitRegSet, false, reason == ExitReason_Normal);
|
||||
}
|
||||
|
||||
bool bDelay;
|
||||
switch (reason)
|
||||
{
|
||||
case CExitInfo::Normal:
|
||||
case CExitInfo::Normal_NoSysCheck:
|
||||
case ExitReason_Normal:
|
||||
case ExitReason_NormalNoSysCheck:
|
||||
ExitRegSet.SetBlockCycleCount(0);
|
||||
if (TargetPC != (uint32_t)-1)
|
||||
{
|
||||
if (TargetPC <= JumpPC && reason == CExitInfo::Normal)
|
||||
if (TargetPC <= JumpPC && reason == ExitReason_Normal)
|
||||
{
|
||||
CPU_Message("CompileSystemCheck 1");
|
||||
CompileSystemCheck((uint32_t)-1, ExitRegSet);
|
||||
|
@ -5290,7 +5290,7 @@ void CArmRecompilerOps::CompileExit(uint32_t JumpPC, uint32_t TargetPC, CRegInfo
|
|||
}
|
||||
else
|
||||
{
|
||||
if (reason == CExitInfo::Normal)
|
||||
if (reason == ExitReason_Normal)
|
||||
{
|
||||
CPU_Message("CompileSystemCheck 2");
|
||||
CompileSystemCheck((uint32_t)-1, ExitRegSet);
|
||||
|
@ -5298,14 +5298,14 @@ void CArmRecompilerOps::CompileExit(uint32_t JumpPC, uint32_t TargetPC, CRegInfo
|
|||
}
|
||||
ExitCodeBlock();
|
||||
break;
|
||||
case CExitInfo::DoSysCall:
|
||||
case ExitReason_DoSysCall:
|
||||
bDelay = m_PipelineStage == PIPELINE_STAGE_JUMP || m_PipelineStage == PIPELINE_STAGE_DELAY_SLOT;
|
||||
MoveConstToArmReg(Arm_R1, (uint32_t)bDelay, bDelay ? "true" : "false");
|
||||
MoveConstToArmReg(Arm_R0, (uint32_t)g_Reg);
|
||||
CallFunction(AddressOf(&CRegisters::DoSysCallException), "CRegisters::DoSysCallException");
|
||||
ExitCodeBlock();
|
||||
break;
|
||||
case CExitInfo::COP1_Unuseable:
|
||||
case ExitReason_COP1Unuseable:
|
||||
bDelay = m_PipelineStage == PIPELINE_STAGE_JUMP || m_PipelineStage == PIPELINE_STAGE_DELAY_SLOT;
|
||||
MoveConstToArmReg(Arm_R2, (uint32_t)1, "1");
|
||||
MoveConstToArmReg(Arm_R1, (uint32_t)bDelay, bDelay ? "true" : "false");
|
||||
|
@ -5313,7 +5313,7 @@ void CArmRecompilerOps::CompileExit(uint32_t JumpPC, uint32_t TargetPC, CRegInfo
|
|||
CallFunction(AddressOf(&CRegisters::DoCopUnusableException), "CRegisters::DoCopUnusableException");
|
||||
ExitCodeBlock();
|
||||
break;
|
||||
case CExitInfo::TLBReadMiss:
|
||||
case ExitReason_TLBReadMiss:
|
||||
bDelay = m_PipelineStage == PIPELINE_STAGE_JUMP || m_PipelineStage == PIPELINE_STAGE_DELAY_SLOT;
|
||||
MoveVariableToArmReg(g_TLBLoadAddress, "g_TLBLoadAddress", Arm_R2);
|
||||
MoveConstToArmReg(Arm_R1, (uint32_t)bDelay, bDelay ? "true" : "false");
|
||||
|
@ -5321,7 +5321,7 @@ void CArmRecompilerOps::CompileExit(uint32_t JumpPC, uint32_t TargetPC, CRegInfo
|
|||
CallFunction(AddressOf(&CRegisters::DoTLBReadMiss), "CRegisters::DoTLBReadMiss");
|
||||
ExitCodeBlock();
|
||||
break;
|
||||
case CExitInfo::TLBWriteMiss:
|
||||
case ExitReason_TLBWriteMiss:
|
||||
ArmBreakPoint(__FILE__, __LINE__);
|
||||
ExitCodeBlock();
|
||||
break;
|
||||
|
@ -5330,7 +5330,7 @@ void CArmRecompilerOps::CompileExit(uint32_t JumpPC, uint32_t TargetPC, CRegInfo
|
|||
}
|
||||
}
|
||||
|
||||
void CArmRecompilerOps::CompileExit(uint32_t JumpPC, uint32_t TargetPC, CRegInfo &ExitRegSet, CExitInfo::EXIT_REASON reason, CArmOps::ArmCompareType CompareType)
|
||||
void CArmRecompilerOps::CompileExit(uint32_t JumpPC, uint32_t TargetPC, CRegInfo &ExitRegSet, ExitReason reason, CArmOps::ArmCompareType CompareType)
|
||||
{
|
||||
BranchLabel20(CompareType, stdstr_f("Exit_%d", m_ExitInfo.size()).c_str());
|
||||
|
||||
|
@ -5380,7 +5380,7 @@ void CArmRecompilerOps::CompileReadTLBMiss(ArmReg AddressReg, ArmReg LookUpReg)
|
|||
ArmReg TlbLoadReg = Map_Variable(CArmRegInfo::VARIABLE_TLB_LOAD_ADDRESS);
|
||||
StoreArmRegToArmRegPointer(AddressReg, TlbLoadReg, 0);
|
||||
CompareArmRegToConst(LookUpReg, 0);
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, CExitInfo::TLBReadMiss, ArmBranch_Equal);
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, ExitReason_TLBReadMiss, ArmBranch_Equal);
|
||||
m_RegWorkingSet.SetArmRegProtected(TlbLoadReg, false);
|
||||
}
|
||||
|
||||
|
@ -5392,7 +5392,7 @@ void CArmRecompilerOps::CompileWriteTLBMiss(ArmReg AddressReg, ArmReg LookUpReg)
|
|||
ArmReg TlbStoreReg = Map_Variable(CArmRegInfo::VARIABLE_TLB_STORE_ADDRESS);
|
||||
StoreArmRegToArmRegPointer(AddressReg, TlbStoreReg, 0);
|
||||
CompareArmRegToConst(LookUpReg, 0);
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, CExitInfo::TLBWriteMiss, ArmBranch_Equal);
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, ExitReason_TLBWriteMiss, ArmBranch_Equal);
|
||||
m_RegWorkingSet.SetArmRegProtected(TlbStoreReg, false);
|
||||
}
|
||||
|
||||
|
@ -5531,7 +5531,7 @@ bool CArmRecompilerOps::InheritParentInfo()
|
|||
m_RegWorkingSet.ResetRegProtection();
|
||||
LinkJump(*JumpInfo, m_Section->m_SectionID, Parent->m_SectionID);
|
||||
|
||||
if (JumpInfo->ExitReason == CExitInfo::Normal_NoSysCheck)
|
||||
if (JumpInfo->ExitReason == ExitReason_NormalNoSysCheck)
|
||||
{
|
||||
if (m_RegWorkingSet.GetBlockCycleCount() != 0)
|
||||
{
|
||||
|
|
|
@ -214,8 +214,8 @@ private:
|
|||
const R4300iOpcode & GetOpcode ( void ) const;
|
||||
void PreCompileOpcode(void);
|
||||
void PostCompileOpcode ( void );
|
||||
void CompileExit(uint32_t JumpPC, uint32_t TargetPC, CRegInfo &ExitRegSet, CExitInfo::EXIT_REASON reason);
|
||||
void CompileExit(uint32_t JumpPC, uint32_t TargetPC, CRegInfo &ExitRegSet, CExitInfo::EXIT_REASON reason, CArmOps::ArmCompareType CompareType);
|
||||
void CompileExit(uint32_t JumpPC, uint32_t TargetPC, CRegInfo &ExitRegSet, ExitReason reason);
|
||||
void CompileExit(uint32_t JumpPC, uint32_t TargetPC, CRegInfo &ExitRegSet, ExitReason reason, CArmOps::ArmCompareType CompareType);
|
||||
static void UpdateSyncCPU(CRegInfo & RegSet, uint32_t Cycles);
|
||||
void UpdateCounters(CRegInfo & RegSet, bool CheckTimer, bool ClearValues = false, bool UpdateTimer = true);
|
||||
void CompileSystemCheck(uint32_t TargetPC, const CRegInfo & RegSet);
|
||||
|
|
|
@ -85,7 +85,7 @@ void CCodeSection::GenerateSectionLinkage()
|
|||
else if (TargetSection[i] == nullptr && JumpInfo[i]->FallThrough)
|
||||
{
|
||||
m_RecompilerOps->LinkJump(*JumpInfo[i], (uint32_t)-1);
|
||||
m_RecompilerOps->CompileExit(JumpInfo[i]->JumpPC, JumpInfo[i]->TargetPC, JumpInfo[i]->RegSet, JumpInfo[i]->ExitReason);
|
||||
m_RecompilerOps->CompileExit(JumpInfo[i]->JumpPC, JumpInfo[i]->TargetPC, JumpInfo[i]->RegSet, JumpInfo[i]->Reason);
|
||||
JumpInfo[i]->FallThrough = false;
|
||||
}
|
||||
else if (TargetSection[i] != nullptr && JumpInfo[i] != nullptr)
|
||||
|
@ -93,7 +93,7 @@ void CCodeSection::GenerateSectionLinkage()
|
|||
if (!JumpInfo[i]->FallThrough) { continue; }
|
||||
if (JumpInfo[i]->TargetPC == TargetSection[i]->m_EnterPC) { continue; }
|
||||
m_RecompilerOps->LinkJump(*JumpInfo[i], (uint32_t)-1);
|
||||
m_RecompilerOps->CompileExit(JumpInfo[i]->JumpPC, JumpInfo[i]->TargetPC, JumpInfo[i]->RegSet, JumpInfo[i]->ExitReason);
|
||||
m_RecompilerOps->CompileExit(JumpInfo[i]->JumpPC, JumpInfo[i]->TargetPC, JumpInfo[i]->RegSet, JumpInfo[i]->Reason);
|
||||
//FreeSection(TargetSection[i],Section);
|
||||
}
|
||||
}
|
||||
|
@ -200,7 +200,7 @@ void CCodeSection::GenerateSectionLinkage()
|
|||
{
|
||||
m_CodeBlock.Log("ExitBlock (from %d):", m_SectionID);
|
||||
m_RecompilerOps->LinkJump(*JumpInfo[i], (uint32_t)-1);
|
||||
m_RecompilerOps->CompileExit(JumpInfo[i]->JumpPC, JumpInfo[i]->TargetPC, JumpInfo[i]->RegSet, JumpInfo[i]->ExitReason);
|
||||
m_RecompilerOps->CompileExit(JumpInfo[i]->JumpPC, JumpInfo[i]->TargetPC, JumpInfo[i]->RegSet, JumpInfo[i]->Reason);
|
||||
continue;
|
||||
}
|
||||
if (JumpInfo[i]->TargetPC != TargetSection[i]->m_EnterPC)
|
||||
|
@ -611,11 +611,11 @@ bool CCodeSection::GenerateNativeCode(uint32_t Test)
|
|||
{
|
||||
if (m_DelaySlot)
|
||||
{
|
||||
m_RecompilerOps->CompileExit(m_RecompilerOps->GetCurrentPC(), m_Jump.TargetPC, m_RecompilerOps->GetRegWorkingSet(), CExitInfo::Normal);
|
||||
m_RecompilerOps->CompileExit(m_RecompilerOps->GetCurrentPC(), m_Jump.TargetPC, m_RecompilerOps->GetRegWorkingSet(), ExitReason_Normal);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_RecompilerOps->CompileExit(m_RecompilerOps->GetCurrentPC(), m_RecompilerOps->GetCurrentPC() + 4, m_RecompilerOps->GetRegWorkingSet(), CExitInfo::Normal);
|
||||
m_RecompilerOps->CompileExit(m_RecompilerOps->GetCurrentPC(), m_RecompilerOps->GetCurrentPC() + 4, m_RecompilerOps->GetRegWorkingSet(), ExitReason_Normal);
|
||||
}
|
||||
m_RecompilerOps->SetNextStepType(PIPELINE_STAGE_END_BLOCK);
|
||||
}
|
||||
|
@ -655,7 +655,7 @@ bool CCodeSection::GenerateNativeCode(uint32_t Test)
|
|||
}
|
||||
else
|
||||
{
|
||||
m_RecompilerOps->CompileExit(m_Jump.JumpPC, m_Jump.TargetPC, m_RecompilerOps->GetRegWorkingSet(), CExitInfo::Normal);
|
||||
m_RecompilerOps->CompileExit(m_Jump.JumpPC, m_Jump.TargetPC, m_RecompilerOps->GetRegWorkingSet(), ExitReason_Normal);
|
||||
}
|
||||
m_RecompilerOps->SetNextStepType(PIPELINE_STAGE_END_BLOCK);
|
||||
}
|
||||
|
|
|
@ -5,28 +5,28 @@
|
|||
|
||||
class CCodeBlock;
|
||||
|
||||
enum ExitReason
|
||||
{
|
||||
ExitReason_Normal,
|
||||
ExitReason_NormalNoSysCheck,
|
||||
ExitReason_DoCPUAction,
|
||||
ExitReason_COP1Unuseable,
|
||||
ExitReason_DoSysCall,
|
||||
ExitReason_TLBReadMiss,
|
||||
ExitReason_TLBWriteMiss,
|
||||
ExitReason_ResetRecompCode,
|
||||
ExitReason_ExceptionOverflow,
|
||||
};
|
||||
|
||||
struct CExitInfo
|
||||
{
|
||||
CExitInfo(CCodeBlock & CodeBlock);
|
||||
|
||||
enum EXIT_REASON
|
||||
{
|
||||
Normal = 0,
|
||||
Normal_NoSysCheck = 1,
|
||||
DoCPU_Action = 2,
|
||||
COP1_Unuseable = 3,
|
||||
DoSysCall = 4,
|
||||
TLBReadMiss = 5,
|
||||
TLBWriteMiss = 6,
|
||||
ExitResetRecompCode = 8,
|
||||
Exit_ExceptionOverflow,
|
||||
};
|
||||
|
||||
std::string Name;
|
||||
uint32_t ID;
|
||||
uint32_t TargetPC;
|
||||
CRegInfo ExitRegSet;
|
||||
EXIT_REASON reason;
|
||||
ExitReason Reason;
|
||||
PIPELINE_STAGE PipelineStage;
|
||||
uint32_t * JumpLoc; // 32-bit jump
|
||||
};
|
||||
|
|
|
@ -14,5 +14,5 @@ CJumpInfo::CJumpInfo(CCodeBlock & CodeBlock) :
|
|||
FallThrough = false;
|
||||
PermLoop = false;
|
||||
DoneDelaySlot = false;
|
||||
ExitReason = CExitInfo::Normal;
|
||||
Reason = ExitReason_Normal;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
struct CJumpInfo
|
||||
{
|
||||
typedef CExitInfo::EXIT_REASON EXIT_REASON;
|
||||
CJumpInfo(CCodeBlock & CodeBlock);
|
||||
|
||||
uint32_t TargetPC;
|
||||
|
@ -16,5 +15,5 @@ struct CJumpInfo
|
|||
bool PermLoop;
|
||||
bool DoneDelaySlot;
|
||||
CRegInfo RegSet;
|
||||
EXIT_REASON ExitReason;
|
||||
ExitReason Reason;
|
||||
};
|
||||
|
|
|
@ -866,7 +866,7 @@ void CX64RecompilerOps::PostCompileOpcode(void)
|
|||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::CompileExit(uint32_t /*JumpPC*/, uint32_t /*TargetPC*/, CRegInfo & /*ExitRegSet*/, CExitInfo::EXIT_REASON /*reason*/)
|
||||
void CX64RecompilerOps::CompileExit(uint32_t /*JumpPC*/, uint32_t /*TargetPC*/, CRegInfo & /*ExitRegSet*/, ExitReason /*reason*/)
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
|
|
@ -213,7 +213,7 @@ public:
|
|||
const R4300iOpcode & GetOpcode(void) const;
|
||||
void PreCompileOpcode(void);
|
||||
void PostCompileOpcode(void);
|
||||
void CompileExit(uint32_t JumpPC, uint32_t TargetPC, CRegInfo &ExitRegSet, CExitInfo::EXIT_REASON reason);
|
||||
void CompileExit(uint32_t JumpPC, uint32_t TargetPC, CRegInfo &ExitRegSet, ExitReason reason);
|
||||
|
||||
void UpdateCounters(CRegInfo & RegSet, bool CheckTimer, bool ClearValues = false, bool UpdateTimer = true);
|
||||
void CompileSystemCheck(uint32_t TargetPC, const CRegInfo & RegSet);
|
||||
|
|
|
@ -348,21 +348,21 @@ void CX86RecompilerOps::CompileReadTLBMiss(uint32_t VirtualAddress, CX86Ops::x86
|
|||
{
|
||||
m_Assembler.MoveConstToVariable(VirtualAddress, g_TLBLoadAddress, "TLBLoadAddress");
|
||||
m_Assembler.CompConstToX86reg(LookUpReg, (uint32_t)-1);
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, CExitInfo::TLBReadMiss, false, &CX86Ops::JeLabel32);
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, ExitReason_TLBReadMiss, false, &CX86Ops::JeLabel32);
|
||||
}
|
||||
|
||||
void CX86RecompilerOps::CompileReadTLBMiss(CX86Ops::x86Reg AddressReg, CX86Ops::x86Reg LookUpReg)
|
||||
{
|
||||
m_Assembler.MoveX86regToVariable(AddressReg, g_TLBLoadAddress, "TLBLoadAddress");
|
||||
m_Assembler.CompConstToX86reg(LookUpReg, (uint32_t)-1);
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, CExitInfo::TLBReadMiss, false, &CX86Ops::JeLabel32);
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, ExitReason_TLBReadMiss, false, &CX86Ops::JeLabel32);
|
||||
}
|
||||
|
||||
void CX86RecompilerOps::CompileWriteTLBMiss(CX86Ops::x86Reg AddressReg, CX86Ops::x86Reg LookUpReg)
|
||||
{
|
||||
m_Assembler.MoveX86regToVariable(AddressReg, &g_TLBStoreAddress, "g_TLBStoreAddress");
|
||||
m_Assembler.CompConstToX86reg(LookUpReg, (uint32_t)-1);
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, CExitInfo::TLBWriteMiss, false, &CX86Ops::JeLabel32);
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, ExitReason_TLBWriteMiss, false, &CX86Ops::JeLabel32);
|
||||
}
|
||||
|
||||
// Trap functions
|
||||
|
@ -645,7 +645,7 @@ void CX86RecompilerOps::Compile_Branch(RecompilerBranchCompare CompareType, bool
|
|||
m_CodeBlock.Log("CompileSystemCheck 12");
|
||||
CompileSystemCheck(FallInfo->TargetPC, m_Section->m_Jump.RegSet);
|
||||
ResetX86Protection();
|
||||
FallInfo->ExitReason = CExitInfo::Normal_NoSysCheck;
|
||||
FallInfo->Reason = ExitReason_NormalNoSysCheck;
|
||||
FallInfo->JumpPC = (uint32_t)-1;
|
||||
}
|
||||
}
|
||||
|
@ -813,7 +813,7 @@ void CX86RecompilerOps::Compile_BranchLikely(RecompilerBranchCompare CompareType
|
|||
}
|
||||
|
||||
LinkJump(m_Section->m_Cont);
|
||||
CompileExit(m_CompilePC, m_CompilePC + 8, m_Section->m_Cont.RegSet, CExitInfo::Normal, true, nullptr);
|
||||
CompileExit(m_CompilePC, m_CompilePC + 8, m_Section->m_Cont.RegSet, ExitReason_Normal, true, nullptr);
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
@ -2207,7 +2207,7 @@ void CX86RecompilerOps::JAL()
|
|||
bool bCheck = TargetPC <= m_CompilePC;
|
||||
UpdateCounters(m_RegWorkingSet, bCheck, true);
|
||||
|
||||
CompileExit((uint32_t)-1, (uint32_t)-1, m_RegWorkingSet, bCheck ? CExitInfo::Normal : CExitInfo::Normal_NoSysCheck, true, nullptr);
|
||||
CompileExit((uint32_t)-1, (uint32_t)-1, m_RegWorkingSet, bCheck ? ExitReason_Normal : ExitReason_NormalNoSysCheck, true, nullptr);
|
||||
}
|
||||
m_PipelineStage = PIPELINE_STAGE_END_BLOCK;
|
||||
}
|
||||
|
@ -2232,7 +2232,7 @@ void CX86RecompilerOps::ADDI()
|
|||
if ((~(rs ^ imm) & (rs ^ sum)) & 0x80000000)
|
||||
{
|
||||
m_RegWorkingSet.SetBlockCycleCount(m_RegWorkingSet.GetBlockCycleCount() + g_System->CountPerOp());
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, CExitInfo::Exit_ExceptionOverflow, true, nullptr);
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, ExitReason_ExceptionOverflow, true, nullptr);
|
||||
m_PipelineStage = PIPELINE_STAGE_END_BLOCK;
|
||||
}
|
||||
else if (m_Opcode.rt != 0)
|
||||
|
@ -2250,7 +2250,7 @@ void CX86RecompilerOps::ADDI()
|
|||
ProtectGPR(m_Opcode.rt);
|
||||
CX86Ops::x86Reg Reg = Map_TempReg(CX86Ops::x86_Any, m_Opcode.rs, false);
|
||||
m_Assembler.AddConstToX86Reg(Reg, (int16_t)m_Opcode.immediate);
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, CExitInfo::Exit_ExceptionOverflow, false, &CX86Ops::JoLabel32);
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, ExitReason_ExceptionOverflow, false, &CX86Ops::JoLabel32);
|
||||
if (m_Opcode.rt != 0)
|
||||
{
|
||||
Map_GPR_32bit(m_Opcode.rt, true, -1);
|
||||
|
@ -4308,7 +4308,7 @@ void CX86RecompilerOps::SPECIAL_JR()
|
|||
R4300iOpcode DelaySlot;
|
||||
if (g_MMU->MemoryValue32(m_CompilePC + 4, DelaySlot.Value) && R4300iInstruction(m_CompilePC, m_Opcode.Value).DelaySlotEffectsCompare(DelaySlot.Value))
|
||||
{
|
||||
CompileExit(m_CompilePC, (uint32_t)-1, m_RegWorkingSet, CExitInfo::Normal, true, nullptr);
|
||||
CompileExit(m_CompilePC, (uint32_t)-1, m_RegWorkingSet, ExitReason_Normal, true, nullptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -4325,7 +4325,7 @@ void CX86RecompilerOps::SPECIAL_JR()
|
|||
{
|
||||
m_Assembler.MoveX86regToVariable(Map_TempReg(CX86Ops::x86_Any, m_Opcode.rs, false), _PROGRAM_COUNTER, "PROGRAM_COUNTER");
|
||||
}
|
||||
CompileExit((uint32_t)-1, (uint32_t)-1, m_RegWorkingSet, CExitInfo::Normal, true, nullptr);
|
||||
CompileExit((uint32_t)-1, (uint32_t)-1, m_RegWorkingSet, ExitReason_Normal, true, nullptr);
|
||||
if (m_Section->m_JumpSection)
|
||||
{
|
||||
m_Section->GenerateSectionLinkage();
|
||||
|
@ -4394,7 +4394,7 @@ void CX86RecompilerOps::SPECIAL_JALR()
|
|||
if (g_MMU->MemoryValue32(m_CompilePC + 4, DelaySlot.Value) &&
|
||||
R4300iInstruction(m_CompilePC, m_Opcode.Value).DelaySlotEffectsCompare(DelaySlot.Value))
|
||||
{
|
||||
CompileExit(m_CompilePC, (uint32_t)-1, m_RegWorkingSet, CExitInfo::Normal, true, nullptr);
|
||||
CompileExit(m_CompilePC, (uint32_t)-1, m_RegWorkingSet, ExitReason_Normal, true, nullptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -4411,7 +4411,7 @@ void CX86RecompilerOps::SPECIAL_JALR()
|
|||
{
|
||||
m_Assembler.MoveX86regToVariable(Map_TempReg(CX86Ops::x86_Any, m_Opcode.rs, false), _PROGRAM_COUNTER, "PROGRAM_COUNTER");
|
||||
}
|
||||
CompileExit((uint32_t)-1, (uint32_t)-1, m_RegWorkingSet, CExitInfo::Normal, true, nullptr);
|
||||
CompileExit((uint32_t)-1, (uint32_t)-1, m_RegWorkingSet, ExitReason_Normal, true, nullptr);
|
||||
if (m_Section->m_JumpSection)
|
||||
{
|
||||
m_Section->GenerateSectionLinkage();
|
||||
|
@ -4427,7 +4427,7 @@ void CX86RecompilerOps::SPECIAL_JALR()
|
|||
|
||||
void CX86RecompilerOps::SPECIAL_SYSCALL()
|
||||
{
|
||||
CompileExit(m_CompilePC, (uint32_t)-1, m_RegWorkingSet, CExitInfo::DoSysCall, true, nullptr);
|
||||
CompileExit(m_CompilePC, (uint32_t)-1, m_RegWorkingSet, ExitReason_DoSysCall, true, nullptr);
|
||||
m_PipelineStage = PIPELINE_STAGE_END_BLOCK;
|
||||
}
|
||||
|
||||
|
@ -5136,7 +5136,7 @@ void CX86RecompilerOps::SPECIAL_ADD()
|
|||
if ((~(Val1 ^ Val2) & (Val1 ^ Sum)) & 0x80000000)
|
||||
{
|
||||
m_RegWorkingSet.SetBlockCycleCount(m_RegWorkingSet.GetBlockCycleCount() + g_System->CountPerOp());
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, CExitInfo::Exit_ExceptionOverflow, true, nullptr);
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, ExitReason_ExceptionOverflow, true, nullptr);
|
||||
m_PipelineStage = PIPELINE_STAGE_END_BLOCK;
|
||||
}
|
||||
else if (m_Opcode.rd != 0)
|
||||
|
@ -5169,7 +5169,7 @@ void CX86RecompilerOps::SPECIAL_ADD()
|
|||
{
|
||||
ResetMemoryStack();
|
||||
}
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, CExitInfo::Exit_ExceptionOverflow, false, &CX86Ops::JoLabel32);
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, ExitReason_ExceptionOverflow, false, &CX86Ops::JoLabel32);
|
||||
if (m_Opcode.rd != 0)
|
||||
{
|
||||
Map_GPR_32bit(m_Opcode.rd, true, -1);
|
||||
|
@ -5229,7 +5229,7 @@ void CX86RecompilerOps::SPECIAL_SUB()
|
|||
if (((rs ^ rt) & (rs ^ sub)) & 0x80000000)
|
||||
{
|
||||
m_RegWorkingSet.SetBlockCycleCount(m_RegWorkingSet.GetBlockCycleCount() + g_System->CountPerOp());
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, CExitInfo::Exit_ExceptionOverflow, true, nullptr);
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, ExitReason_ExceptionOverflow, true, nullptr);
|
||||
m_PipelineStage = PIPELINE_STAGE_END_BLOCK;
|
||||
}
|
||||
else if (m_Opcode.rd != 0)
|
||||
|
@ -5258,7 +5258,7 @@ void CX86RecompilerOps::SPECIAL_SUB()
|
|||
{
|
||||
m_Assembler.SubVariableFromX86reg(Reg, &_GPR[m_Opcode.rt].W[0], CRegName::GPR_Lo[m_Opcode.rt]);
|
||||
}
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, CExitInfo::Exit_ExceptionOverflow, false, &CX86Ops::JoLabel32);
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, ExitReason_ExceptionOverflow, false, &CX86Ops::JoLabel32);
|
||||
if (m_Opcode.rd != 0)
|
||||
{
|
||||
Map_GPR_32bit(m_Opcode.rd, true, -1);
|
||||
|
@ -6620,7 +6620,7 @@ void CX86RecompilerOps::SPECIAL_DADD()
|
|||
if ((~(rs ^ rt) & (rs ^ sum)) & 0x8000000000000000)
|
||||
{
|
||||
m_RegWorkingSet.SetBlockCycleCount(m_RegWorkingSet.GetBlockCycleCount() + g_System->CountPerOp());
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, CExitInfo::Exit_ExceptionOverflow, true, nullptr);
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, ExitReason_ExceptionOverflow, true, nullptr);
|
||||
m_PipelineStage = PIPELINE_STAGE_END_BLOCK;
|
||||
}
|
||||
else
|
||||
|
@ -6670,7 +6670,7 @@ void CX86RecompilerOps::SPECIAL_DADD()
|
|||
m_Assembler.AddVariableToX86reg(RegLo, &_GPR[source2].W[0], CRegName::GPR_Lo[source2]);
|
||||
m_Assembler.AdcVariableToX86reg(RegHi, &_GPR[source2].W[1], CRegName::GPR_Hi[source2]);
|
||||
}
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, CExitInfo::Exit_ExceptionOverflow, false, &CX86Ops::JoLabel32);
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, ExitReason_ExceptionOverflow, false, &CX86Ops::JoLabel32);
|
||||
if (m_Opcode.rd != 0)
|
||||
{
|
||||
UnProtectGPR(source1);
|
||||
|
@ -6755,7 +6755,7 @@ void CX86RecompilerOps::SPECIAL_DSUB()
|
|||
if (((rs ^ rt) & (rs ^ sub)) & 0x8000000000000000)
|
||||
{
|
||||
m_RegWorkingSet.SetBlockCycleCount(m_RegWorkingSet.GetBlockCycleCount() + g_System->CountPerOp());
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, CExitInfo::Exit_ExceptionOverflow, true, nullptr);
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, ExitReason_ExceptionOverflow, true, nullptr);
|
||||
m_PipelineStage = PIPELINE_STAGE_END_BLOCK;
|
||||
}
|
||||
else
|
||||
|
@ -6805,7 +6805,7 @@ void CX86RecompilerOps::SPECIAL_DSUB()
|
|||
m_Assembler.SubVariableFromX86reg(RegLo, &_GPR[source2].W[0], CRegName::GPR_Lo[source2]);
|
||||
m_Assembler.SbbVariableFromX86reg(RegHi, &_GPR[source2].W[1], CRegName::GPR_Hi[source2]);
|
||||
}
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, CExitInfo::Exit_ExceptionOverflow, false, &CX86Ops::JoLabel32);
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, ExitReason_ExceptionOverflow, false, &CX86Ops::JoLabel32);
|
||||
if (m_Opcode.rd != 0)
|
||||
{
|
||||
UnProtectGPR(source1);
|
||||
|
@ -7373,7 +7373,7 @@ void CX86RecompilerOps::COP0_CO_ERET(void)
|
|||
m_Assembler.CallFunc((uint32_t)x86_compiler_COP0_CO_ERET, "x86_compiler_COP0_CO_ERET");
|
||||
|
||||
UpdateCounters(m_RegWorkingSet, true, true);
|
||||
CompileExit(m_CompilePC, (uint32_t)-1, m_RegWorkingSet, CExitInfo::Normal, true, nullptr);
|
||||
CompileExit(m_CompilePC, (uint32_t)-1, m_RegWorkingSet, ExitReason_Normal, true, nullptr);
|
||||
m_PipelineStage = PIPELINE_STAGE_END_BLOCK;
|
||||
}
|
||||
|
||||
|
@ -8439,7 +8439,7 @@ void CX86RecompilerOps::CompileExitCode()
|
|||
m_CodeBlock.Log(" $%s", ExitIter->Name.c_str());
|
||||
m_Assembler.SetJump32(ExitIter->JumpLoc, (uint32_t *)*g_RecompPos);
|
||||
m_PipelineStage = ExitIter->PipelineStage;
|
||||
CompileExit((uint32_t)-1, ExitIter->TargetPC, ExitIter->ExitRegSet, ExitIter->reason, true, nullptr);
|
||||
CompileExit((uint32_t)-1, ExitIter->TargetPC, ExitIter->ExitRegSet, ExitIter->Reason, true, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8453,7 +8453,7 @@ void CX86RecompilerOps::CompileCop1Test()
|
|||
m_Assembler.TestVariable(STATUS_CU1, &g_Reg->STATUS_REGISTER, "STATUS_REGISTER");
|
||||
CRegInfo ExitRegSet = m_RegWorkingSet;
|
||||
ExitRegSet.SetBlockCycleCount(ExitRegSet.GetBlockCycleCount() + g_System->CountPerOp());
|
||||
CompileExit(m_CompilePC, m_CompilePC, ExitRegSet, CExitInfo::COP1_Unuseable, false, &CX86Ops::JeLabel32);
|
||||
CompileExit(m_CompilePC, m_CompilePC, ExitRegSet, ExitReason_COP1Unuseable, false, &CX86Ops::JeLabel32);
|
||||
m_RegWorkingSet.SetFpuBeenUsed(true);
|
||||
}
|
||||
|
||||
|
@ -8834,7 +8834,7 @@ bool CX86RecompilerOps::InheritParentInfo()
|
|||
m_RegWorkingSet.ResetX86Protection();
|
||||
LinkJump(*JumpInfo, m_Section->m_SectionID, Parent->m_SectionID);
|
||||
|
||||
if (JumpInfo->ExitReason == CExitInfo::Normal_NoSysCheck)
|
||||
if (JumpInfo->Reason == ExitReason_NormalNoSysCheck)
|
||||
{
|
||||
if (JumpInfo->RegSet.GetBlockCycleCount() != 0)
|
||||
{
|
||||
|
@ -9356,12 +9356,12 @@ void CX86RecompilerOps::OverflowDelaySlot(bool TestTimer)
|
|||
m_PipelineStage = PIPELINE_STAGE_END_BLOCK;
|
||||
}
|
||||
|
||||
void CX86RecompilerOps::CompileExit(uint32_t JumpPC, uint32_t TargetPC, CRegInfo &ExitRegSet, CExitInfo::EXIT_REASON reason)
|
||||
void CX86RecompilerOps::CompileExit(uint32_t JumpPC, uint32_t TargetPC, CRegInfo &ExitRegSet, ExitReason reason)
|
||||
{
|
||||
CompileExit(JumpPC, TargetPC, ExitRegSet, reason, true, nullptr);
|
||||
}
|
||||
|
||||
void CX86RecompilerOps::CompileExit(uint32_t JumpPC, uint32_t TargetPC, CRegInfo &ExitRegSet, CExitInfo::EXIT_REASON reason, bool CompileNow, void(CX86Ops::*x86Jmp)(const char * Label, uint32_t Value))
|
||||
void CX86RecompilerOps::CompileExit(uint32_t JumpPC, uint32_t TargetPC, CRegInfo &ExitRegSet, ExitReason reason, bool CompileNow, void(CX86Ops::*x86Jmp)(const char * Label, uint32_t Value))
|
||||
{
|
||||
if (!CompileNow)
|
||||
{
|
||||
|
@ -9377,7 +9377,7 @@ void CX86RecompilerOps::CompileExit(uint32_t JumpPC, uint32_t TargetPC, CRegInfo
|
|||
ExitInfo.Name = ExitName;
|
||||
ExitInfo.TargetPC = TargetPC;
|
||||
ExitInfo.ExitRegSet = ExitRegSet;
|
||||
ExitInfo.reason = reason;
|
||||
ExitInfo.Reason = reason;
|
||||
ExitInfo.PipelineStage = m_PipelineStage;
|
||||
ExitInfo.JumpLoc = (uint32_t *)(*g_RecompPos - 4);
|
||||
m_ExitInfo.push_back(ExitInfo);
|
||||
|
@ -9390,21 +9390,21 @@ void CX86RecompilerOps::CompileExit(uint32_t JumpPC, uint32_t TargetPC, CRegInfo
|
|||
if (TargetPC != (uint32_t)-1)
|
||||
{
|
||||
m_Assembler.MoveConstToVariable(TargetPC, &g_Reg->m_PROGRAM_COUNTER, "PROGRAM_COUNTER");
|
||||
UpdateCounters(ExitRegSet, TargetPC <= JumpPC && JumpPC != -1, reason == CExitInfo::Normal);
|
||||
UpdateCounters(ExitRegSet, TargetPC <= JumpPC && JumpPC != -1, reason == ExitReason_Normal);
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateCounters(ExitRegSet, false, reason == CExitInfo::Normal);
|
||||
UpdateCounters(ExitRegSet, false, reason == ExitReason_Normal);
|
||||
}
|
||||
|
||||
switch (reason)
|
||||
{
|
||||
case CExitInfo::Normal:
|
||||
case CExitInfo::Normal_NoSysCheck:
|
||||
case ExitReason_Normal:
|
||||
case ExitReason_NormalNoSysCheck:
|
||||
ExitRegSet.SetBlockCycleCount(0);
|
||||
if (TargetPC != (uint32_t)-1)
|
||||
{
|
||||
if (TargetPC <= JumpPC && reason == CExitInfo::Normal)
|
||||
if (TargetPC <= JumpPC && reason == ExitReason_Normal)
|
||||
{
|
||||
m_CodeBlock.Log("CompileSystemCheck 1");
|
||||
CompileSystemCheck((uint32_t)-1, ExitRegSet);
|
||||
|
@ -9412,7 +9412,7 @@ void CX86RecompilerOps::CompileExit(uint32_t JumpPC, uint32_t TargetPC, CRegInfo
|
|||
}
|
||||
else
|
||||
{
|
||||
if (reason == CExitInfo::Normal)
|
||||
if (reason == ExitReason_Normal)
|
||||
{
|
||||
m_CodeBlock.Log("CompileSystemCheck 2");
|
||||
CompileSystemCheck((uint32_t)-1, ExitRegSet);
|
||||
|
@ -9516,11 +9516,11 @@ void CX86RecompilerOps::CompileExit(uint32_t JumpPC, uint32_t TargetPC, CRegInfo
|
|||
ExitCodeBlock();
|
||||
#endif
|
||||
break;
|
||||
case CExitInfo::DoCPU_Action:
|
||||
case ExitReason_DoCPUAction:
|
||||
m_Assembler.CallThis((uint32_t)g_SystemEvents, AddressOf(&CSystemEvents::ExecuteEvents), "CSystemEvents::ExecuteEvents", 4);
|
||||
ExitCodeBlock();
|
||||
break;
|
||||
case CExitInfo::DoSysCall:
|
||||
case ExitReason_DoSysCall:
|
||||
{
|
||||
bool bDelay = m_PipelineStage == PIPELINE_STAGE_JUMP || m_PipelineStage == PIPELINE_STAGE_DELAY_SLOT;
|
||||
m_Assembler.PushImm32(bDelay ? "true" : "false", bDelay);
|
||||
|
@ -9528,7 +9528,7 @@ void CX86RecompilerOps::CompileExit(uint32_t JumpPC, uint32_t TargetPC, CRegInfo
|
|||
ExitCodeBlock();
|
||||
}
|
||||
break;
|
||||
case CExitInfo::COP1_Unuseable:
|
||||
case ExitReason_COP1Unuseable:
|
||||
{
|
||||
bool bDelay = m_PipelineStage == PIPELINE_STAGE_JUMP || m_PipelineStage == PIPELINE_STAGE_DELAY_SLOT;
|
||||
m_Assembler.PushImm32("1", 1);
|
||||
|
@ -9537,22 +9537,22 @@ void CX86RecompilerOps::CompileExit(uint32_t JumpPC, uint32_t TargetPC, CRegInfo
|
|||
ExitCodeBlock();
|
||||
}
|
||||
break;
|
||||
case CExitInfo::ExitResetRecompCode:
|
||||
case ExitReason_ResetRecompCode:
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
ExitCodeBlock();
|
||||
break;
|
||||
case CExitInfo::TLBReadMiss:
|
||||
case ExitReason_TLBReadMiss:
|
||||
m_Assembler.MoveVariableToX86reg(g_TLBLoadAddress, "g_TLBLoadAddress", CX86Ops::x86_EDX);
|
||||
m_Assembler.Push(CX86Ops::x86_EDX);
|
||||
m_Assembler.PushImm32(m_PipelineStage == PIPELINE_STAGE_JUMP || m_PipelineStage == PIPELINE_STAGE_DELAY_SLOT);
|
||||
m_Assembler.CallThis((uint32_t)g_Reg, AddressOf(&CRegisters::DoTLBReadMiss), "CRegisters::DoTLBReadMiss", 12);
|
||||
ExitCodeBlock();
|
||||
break;
|
||||
case CExitInfo::TLBWriteMiss:
|
||||
case ExitReason_TLBWriteMiss:
|
||||
m_Assembler.X86BreakPoint(__FILE__, __LINE__);
|
||||
ExitCodeBlock();
|
||||
break;
|
||||
case CExitInfo::Exit_ExceptionOverflow:
|
||||
case ExitReason_ExceptionOverflow:
|
||||
m_Assembler.PushImm32(m_PipelineStage == PIPELINE_STAGE_JUMP || m_PipelineStage == PIPELINE_STAGE_DELAY_SLOT);
|
||||
m_Assembler.CallThis((uint32_t)g_Reg, AddressOf(&CRegisters::DoOverflowException), "CRegisters::DoOverflowException", 12);
|
||||
ExitCodeBlock();
|
||||
|
@ -9650,7 +9650,7 @@ void CX86RecompilerOps::CompileLoadMemoryValue(CX86Ops::x86Reg AddressReg, CX86O
|
|||
m_Assembler.CallThis((uint32_t)(&m_MMU), AddressOf(&CMipsMemoryVM::LW_NonMemory), "CMipsMemoryVM::LW_NonMemory", 12);
|
||||
m_Assembler.TestX86ByteRegToX86Reg(CX86Ops::x86_AL, CX86Ops::x86_AL);
|
||||
m_RegWorkingSet.AfterCallDirect();
|
||||
CompileExit((uint32_t)-1, (uint32_t)-1, m_RegWorkingSet, CExitInfo::Normal_NoSysCheck, false, &CX86Ops::JeLabel32);
|
||||
CompileExit((uint32_t)-1, (uint32_t)-1, m_RegWorkingSet, ExitReason_NormalNoSysCheck, false, &CX86Ops::JeLabel32);
|
||||
m_Assembler.MoveConstToX86reg((uint32_t)&m_TempValue32, TempReg);
|
||||
m_Assembler.SubX86RegToX86Reg(TempReg, AddressReg);
|
||||
}
|
||||
|
@ -9662,7 +9662,7 @@ void CX86RecompilerOps::CompileLoadMemoryValue(CX86Ops::x86Reg AddressReg, CX86O
|
|||
m_Assembler.CallThis((uint32_t)(&m_MMU), AddressOf(&CMipsMemoryVM::LH_NonMemory), "CMipsMemoryVM::LH_NonMemory", 12);
|
||||
m_Assembler.TestX86ByteRegToX86Reg(CX86Ops::x86_AL, CX86Ops::x86_AL);
|
||||
m_RegWorkingSet.AfterCallDirect();
|
||||
CompileExit((uint32_t)-1, (uint32_t)-1, m_RegWorkingSet, CExitInfo::Normal_NoSysCheck, false, &CX86Ops::JeLabel32);
|
||||
CompileExit((uint32_t)-1, (uint32_t)-1, m_RegWorkingSet, ExitReason_NormalNoSysCheck, false, &CX86Ops::JeLabel32);
|
||||
m_Assembler.MoveConstToX86reg((uint32_t)&m_TempValue32, TempReg);
|
||||
m_Assembler.SubX86RegToX86Reg(TempReg, AddressReg);
|
||||
m_Assembler.XorConstToX86Reg(AddressReg, 2);
|
||||
|
@ -9675,7 +9675,7 @@ void CX86RecompilerOps::CompileLoadMemoryValue(CX86Ops::x86Reg AddressReg, CX86O
|
|||
m_Assembler.CallThis((uint32_t)&m_MMU, AddressOf(&CMipsMemoryVM::LB_NonMemory), "CMipsMemoryVM::LB_NonMemory", 12);
|
||||
m_Assembler.TestX86ByteRegToX86Reg(CX86Ops::x86_AL, CX86Ops::x86_AL);
|
||||
m_RegWorkingSet.AfterCallDirect();
|
||||
CompileExit((uint32_t)-1, (uint32_t)-1, m_RegWorkingSet, CExitInfo::Normal_NoSysCheck, false, &CX86Ops::JeLabel32);
|
||||
CompileExit((uint32_t)-1, (uint32_t)-1, m_RegWorkingSet, ExitReason_NormalNoSysCheck, false, &CX86Ops::JeLabel32);
|
||||
m_Assembler.MoveConstToX86reg((uint32_t)&m_TempValue32, TempReg);
|
||||
m_Assembler.SubX86RegToX86Reg(TempReg, AddressReg);
|
||||
m_Assembler.XorConstToX86Reg(AddressReg, 3);
|
||||
|
@ -9823,7 +9823,7 @@ void CX86RecompilerOps::CompileStoreMemoryValue(CX86Ops::x86Reg AddressReg, CX86
|
|||
}
|
||||
m_Assembler.TestX86ByteRegToX86Reg(CX86Ops::x86_AL, CX86Ops::x86_AL);
|
||||
m_RegWorkingSet.AfterCallDirect();
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, CExitInfo::Normal_NoSysCheck, false, &CX86Ops::JeLabel32);
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, ExitReason_NormalNoSysCheck, false, &CX86Ops::JeLabel32);
|
||||
m_Assembler.JmpLabel8(stdstr_f("MemoryWrite_%X_Done:", m_CompilePC).c_str(), 0);
|
||||
MemoryWriteDone = (uint8_t *)(*g_RecompPos - 1);
|
||||
}
|
||||
|
@ -9846,7 +9846,7 @@ void CX86RecompilerOps::CompileStoreMemoryValue(CX86Ops::x86Reg AddressReg, CX86
|
|||
}
|
||||
m_Assembler.TestX86ByteRegToX86Reg(CX86Ops::x86_AL, CX86Ops::x86_AL);
|
||||
m_RegWorkingSet.AfterCallDirect();
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, CExitInfo::Normal_NoSysCheck, false, &CX86Ops::JeLabel32);
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, ExitReason_NormalNoSysCheck, false, &CX86Ops::JeLabel32);
|
||||
m_Assembler.JmpLabel8(stdstr_f("MemoryWrite_%X_Done:", m_CompilePC).c_str(), 0);
|
||||
MemoryWriteDone = (uint8_t *)(*g_RecompPos - 1);
|
||||
}
|
||||
|
@ -9869,7 +9869,7 @@ void CX86RecompilerOps::CompileStoreMemoryValue(CX86Ops::x86Reg AddressReg, CX86
|
|||
}
|
||||
m_Assembler.TestX86ByteRegToX86Reg(CX86Ops::x86_AL, CX86Ops::x86_AL);
|
||||
m_RegWorkingSet.AfterCallDirect();
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, CExitInfo::Normal_NoSysCheck, false, &CX86Ops::JeLabel32);
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, ExitReason_NormalNoSysCheck, false, &CX86Ops::JeLabel32);
|
||||
m_Assembler.JmpLabel8(stdstr_f("MemoryWrite_%X_Done:", m_CompilePC).c_str(), 0);
|
||||
MemoryWriteDone = (uint8_t *)(*g_RecompPos - 1);
|
||||
}
|
||||
|
@ -9894,7 +9894,7 @@ void CX86RecompilerOps::CompileStoreMemoryValue(CX86Ops::x86Reg AddressReg, CX86
|
|||
}
|
||||
m_Assembler.TestX86ByteRegToX86Reg(CX86Ops::x86_AL, CX86Ops::x86_AL);
|
||||
m_RegWorkingSet.AfterCallDirect();
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, CExitInfo::Normal_NoSysCheck, false, &CX86Ops::JeLabel32);
|
||||
CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, ExitReason_NormalNoSysCheck, false, &CX86Ops::JeLabel32);
|
||||
m_Assembler.JmpLabel8(stdstr_f("MemoryWrite_%X_Done:", m_CompilePC).c_str(), 0);
|
||||
MemoryWriteDone = (uint8_t *)(*g_RecompPos - 1);
|
||||
}
|
||||
|
|
|
@ -230,7 +230,7 @@ public:
|
|||
const R4300iOpcode & GetOpcode(void) const;
|
||||
void PreCompileOpcode(void);
|
||||
void PostCompileOpcode(void);
|
||||
void CompileExit(uint32_t JumpPC, uint32_t TargetPC, CRegInfo &ExitRegSet, CExitInfo::EXIT_REASON reason);
|
||||
void CompileExit(uint32_t JumpPC, uint32_t TargetPC, CRegInfo &ExitRegSet, ExitReason Reason);
|
||||
|
||||
void CompileReadTLBMiss(uint32_t VirtualAddress, CX86Ops::x86Reg LookUpReg);
|
||||
void CompileReadTLBMiss(CX86Ops::x86Reg AddressReg, CX86Ops::x86Reg LookUpReg);
|
||||
|
@ -313,7 +313,7 @@ private:
|
|||
void LW_KnownAddress(CX86Ops::x86Reg Reg, uint32_t VAddr);
|
||||
void LW(bool ResultSigned, bool bRecordLLBit);
|
||||
void SW(bool bCheckLLbit);
|
||||
void CompileExit(uint32_t JumpPC, uint32_t TargetPC, CRegInfo &ExitRegSet, CExitInfo::EXIT_REASON reason, bool CompileNow, void(CX86Ops::*x86Jmp)(const char * Label, uint32_t Value));
|
||||
void CompileExit(uint32_t JumpPC, uint32_t TargetPC, CRegInfo &ExitRegSet, ExitReason Reason, bool CompileNow, void(CX86Ops::*x86Jmp)(const char * Label, uint32_t Value));
|
||||
void ResetMemoryStack();
|
||||
|
||||
EXIT_LIST m_ExitInfo;
|
||||
|
|
Loading…
Reference in New Issue