[Project64] rename tofix to legacycode

This commit is contained in:
zilmar 2015-12-15 17:01:06 +11:00
parent 9256356081
commit 5c27d6d1e8
9 changed files with 31 additions and 31 deletions

View File

@ -69,7 +69,7 @@ C7zip::~C7zip (void)
delete m_db; delete m_db;
m_db = NULL; m_db = NULL;
} }
#ifdef tofix #ifdef legacycode
SetNotificationCallback(NULL,NULL); SetNotificationCallback(NULL,NULL);
SzArDbExFree(&m_db, m_allocImp.Free); SzArDbExFree(&m_db, m_allocImp.Free);
@ -90,7 +90,7 @@ void C7zip::SetNotificationCallback (LP7ZNOTIFICATION NotfyFnc, void * CBInfo)
m_NotfyCallbackInfo = CBInfo; m_NotfyCallbackInfo = CBInfo;
} }
#ifdef tofix #ifdef legacycode
void C7zip::StatusUpdate(_7Z_STATUS status, int Value1, int Value2, C7zip * _this ) void C7zip::StatusUpdate(_7Z_STATUS status, int Value1, int Value2, C7zip * _this )
{ {
CFileItem * File = _this->m_CurrentFile >= 0 ? _this->FileItem(_this->m_CurrentFile) : NULL; CFileItem * File = _this->m_CurrentFile >= 0 ? _this->FileItem(_this->m_CurrentFile) : NULL;

View File

@ -2836,7 +2836,7 @@ void R4300iOp::UnknownOpcode()
g_System->m_EndEmulation = true; g_System->m_EndEmulation = true;
g_Notify->BreakPoint(__FILE__, __LINE__); g_Notify->BreakPoint(__FILE__, __LINE__);
#ifdef tofix #ifdef legacycode
if (HaveDebugger && !inFullScreen) if (HaveDebugger && !inFullScreen)
{ {
int32_t response; int32_t response;

View File

@ -220,7 +220,7 @@ void CDMA::PI_DMA_WRITE()
{ {
uint32_t i; uint32_t i;
#ifdef tofix #ifdef legacycode
#ifdef ROM_IN_MAPSPACE #ifdef ROM_IN_MAPSPACE
if (WrittenToRom) if (WrittenToRom)
{ {

View File

@ -2399,7 +2399,7 @@ bool CMipsMemoryVM::LB_NonMemory(uint32_t PAddr, uint32_t* Value, bool /*SignExt
if (PAddr >= 0x10000000 && PAddr < 0x16000000) if (PAddr >= 0x10000000 && PAddr < 0x16000000)
{ {
g_Notify->BreakPoint(__FILE__, __LINE__); g_Notify->BreakPoint(__FILE__, __LINE__);
#ifdef tofix #ifdef legacycode
if (WrittenToRom) if (WrittenToRom)
{ {
return false; return false;
@ -3085,7 +3085,7 @@ bool CMipsMemoryVM::SW_NonMemory(uint32_t PAddr, uint32_t Value)
} }
} }
} }
#ifdef tofix #ifdef legacycode
if (ShowUnhandledMemory) if (ShowUnhandledMemory)
{ {
//if ( ( Value & DPC_CLR_TMEM_CTR ) != 0) //if ( ( Value & DPC_CLR_TMEM_CTR ) != 0)

View File

@ -327,7 +327,7 @@ void CCodeSection::CompileExit(uint32_t JumpPC, uint32_t TargetPC, CRegInfo &Exi
break; break;
case CExitInfo::ExitResetRecompCode: case CExitInfo::ExitResetRecompCode:
g_Notify->BreakPoint(__FILE__, __LINE__); g_Notify->BreakPoint(__FILE__, __LINE__);
#ifdef tofix #ifdef legacycode
if (m_NextInstruction == JUMP || m_NextInstruction == DELAY_SLOT) if (m_NextInstruction == JUMP || m_NextInstruction == DELAY_SLOT)
{ {
X86BreakPoint(__FILEW__,__LINE__); X86BreakPoint(__FILEW__,__LINE__);
@ -400,7 +400,7 @@ void CCodeSection::GenerateSectionLinkage()
if ((CompilePC() & 0xFFC) == 0xFFC) if ((CompilePC() & 0xFFC) == 0xFFC)
{ {
g_Notify->BreakPoint(__FILE__, __LINE__); g_Notify->BreakPoint(__FILE__, __LINE__);
#ifdef tofix #ifdef legacycode
//Handle Fall througth //Handle Fall througth
uint8_t * Jump = NULL; uint8_t * Jump = NULL;
for (i = 0; i < 2; i ++) for (i = 0; i < 2; i ++)

View File

@ -239,7 +239,7 @@ bool LoopAnalysis::CheckLoopRegisterUsage(CCodeSection * Section)
case R4300i_SPECIAL_DSRA32: SPECIAL_DSRA32(); break; case R4300i_SPECIAL_DSRA32: SPECIAL_DSRA32(); break;
default: default:
g_Notify->BreakPoint(__FILE__, __LINE__); g_Notify->BreakPoint(__FILE__, __LINE__);
#ifdef tofix #ifdef legacycode
if (m_Command.Hex == 0x00000001) { break; } if (m_Command.Hex == 0x00000001) { break; }
g_Notify->DisplayError(L"Unhandled R4300i OpCode in FillSectionInfo 5\n%s", g_Notify->DisplayError(L"Unhandled R4300i OpCode in FillSectionInfo 5\n%s",
R4300iOpcodeName(m_Command.Hex,m_PC)); R4300iOpcodeName(m_Command.Hex,m_PC));
@ -308,7 +308,7 @@ bool LoopAnalysis::CheckLoopRegisterUsage(CCodeSection * Section)
break; break;
case R4300i_REGIMM_BLTZAL: case R4300i_REGIMM_BLTZAL:
g_Notify->BreakPoint(__FILE__, __LINE__); g_Notify->BreakPoint(__FILE__, __LINE__);
#ifdef tofix #ifdef legacycode
m_Reg.GetMipsRegLo(31) = m_PC + 8; m_Reg.GetMipsRegLo(31) = m_PC + 8;
m_Reg.SetMipsRegState(31,CRegInfo::STATE_CONST_32_SIGN); m_Reg.SetMipsRegState(31,CRegInfo::STATE_CONST_32_SIGN);
Section->m_Cont.TargetPC = m_PC + 8; Section->m_Cont.TargetPC = m_PC + 8;
@ -324,7 +324,7 @@ bool LoopAnalysis::CheckLoopRegisterUsage(CCodeSection * Section)
break; break;
case R4300i_REGIMM_BGEZAL: case R4300i_REGIMM_BGEZAL:
g_Notify->BreakPoint(__FILE__, __LINE__); g_Notify->BreakPoint(__FILE__, __LINE__);
#ifdef tofix #ifdef legacycode
m_NextInstruction = DELAY_SLOT; m_NextInstruction = DELAY_SLOT;
if (m_Reg.IsConst(m_Command.rs)) if (m_Reg.IsConst(m_Command.rs))
{ {
@ -366,7 +366,7 @@ bool LoopAnalysis::CheckLoopRegisterUsage(CCodeSection * Section)
break; break;
default: default:
g_Notify->BreakPoint(__FILE__, __LINE__); g_Notify->BreakPoint(__FILE__, __LINE__);
#ifdef tofix #ifdef legacycode
if (m_Command.Hex == 0x0407000D) { break; } if (m_Command.Hex == 0x0407000D) { break; }
g_Notify->DisplayError(L"Unhandled R4300i OpCode in FillSectionInfo 4\n%s", g_Notify->DisplayError(L"Unhandled R4300i OpCode in FillSectionInfo 4\n%s",
R4300iOpcodeName(m_Command.Hex,m_PC)); R4300iOpcodeName(m_Command.Hex,m_PC));
@ -377,7 +377,7 @@ bool LoopAnalysis::CheckLoopRegisterUsage(CCodeSection * Section)
break; break;
case R4300i_JAL: case R4300i_JAL:
g_Notify->BreakPoint(__FILE__, __LINE__); g_Notify->BreakPoint(__FILE__, __LINE__);
#ifdef tofix #ifdef legacycode
m_NextInstruction = DELAY_SLOT; m_NextInstruction = DELAY_SLOT;
m_Reg.GetMipsRegLo(31) = m_PC + 8; m_Reg.GetMipsRegLo(31) = m_PC + 8;
m_Reg.SetMipsRegState(31,CRegInfo::STATE_CONST_32_SIGN); m_Reg.SetMipsRegState(31,CRegInfo::STATE_CONST_32_SIGN);
@ -582,7 +582,7 @@ bool LoopAnalysis::CheckLoopRegisterUsage(CCodeSection * Section)
if (m_PC == m_PC + ((int16_t)m_Command.offset << 2) + 4) if (m_PC == m_PC + ((int16_t)m_Command.offset << 2) + 4)
{ {
g_Notify->BreakPoint(__FILE__, __LINE__); g_Notify->BreakPoint(__FILE__, __LINE__);
#ifdef tofix #ifdef legacycode
if (!DelaySlotEffectsCompare(m_PC,m_Command.rs,m_Command.rt)) if (!DelaySlotEffectsCompare(m_PC,m_Command.rs,m_Command.rt))
{ {
if (!Section->m_Jump.PermLoop) if (!Section->m_Jump.PermLoop)
@ -611,7 +611,7 @@ bool LoopAnalysis::CheckLoopRegisterUsage(CCodeSection * Section)
if (m_PC == Section->m_Jump.TargetPC) if (m_PC == Section->m_Jump.TargetPC)
{ {
g_Notify->BreakPoint(__FILE__, __LINE__); g_Notify->BreakPoint(__FILE__, __LINE__);
#ifdef tofix #ifdef legacycode
if (!DelaySlotEffectsCompare(m_PC,m_Command.rs,m_Command.rt)) { if (!DelaySlotEffectsCompare(m_PC,m_Command.rs,m_Command.rt)) {
Section->m_Jump.PermLoop = true; Section->m_Jump.PermLoop = true;
} }
@ -933,7 +933,7 @@ void LoopAnalysis::SPECIAL_SRAV()
void LoopAnalysis::SPECIAL_JR() void LoopAnalysis::SPECIAL_JR()
{ {
g_Notify->BreakPoint(__FILE__, __LINE__); g_Notify->BreakPoint(__FILE__, __LINE__);
#ifdef tofix #ifdef legacycode
if (m_Reg.IsConst(m_Command.rs)) if (m_Reg.IsConst(m_Command.rs))
{ {
Section->m_Jump.TargetPC = m_Reg.GetMipsRegLo(m_Command.rs); Section->m_Jump.TargetPC = m_Reg.GetMipsRegLo(m_Command.rs);
@ -949,7 +949,7 @@ void LoopAnalysis::SPECIAL_JR()
void LoopAnalysis::SPECIAL_JALR() void LoopAnalysis::SPECIAL_JALR()
{ {
g_Notify->BreakPoint(__FILE__, __LINE__); g_Notify->BreakPoint(__FILE__, __LINE__);
#ifdef tofix #ifdef legacycode
m_Reg.GetMipsRegLo(m_Command.rd) = m_PC + 8; m_Reg.GetMipsRegLo(m_Command.rd) = m_PC + 8;
m_Reg.SetMipsRegState(m_Command.rd,CRegInfo::STATE_CONST_32_SIGN); m_Reg.SetMipsRegState(m_Command.rd,CRegInfo::STATE_CONST_32_SIGN);
if (m_Reg.IsConst(m_Command.rs)) { if (m_Reg.IsConst(m_Command.rs)) {

View File

@ -53,7 +53,7 @@ void CRecompiler::Run()
} }
m_EndEmulation = false; m_EndEmulation = false;
#ifdef tofix #ifdef legacycode
*g_MemoryStack = (uint32_t)(RDRAM+(_GPR[29].W[0] & 0x1FFFFFFF)); *g_MemoryStack = (uint32_t)(RDRAM+(_GPR[29].W[0] & 0x1FFFFFFF));
#endif #endif
__try __try
@ -175,7 +175,7 @@ void CRecompiler::RecompilerMain_VirtualTable_validate()
if (Info == NULL) if (Info == NULL)
{ {
g_Notify->BreakPoint(__FILE__, __LINE__); g_Notify->BreakPoint(__FILE__, __LINE__);
#ifdef tofix #ifdef legacycode
if (!g_TLB->ValidVaddr(PROGRAM_COUNTER)) if (!g_TLB->ValidVaddr(PROGRAM_COUNTER))
{ {
DoTLBMiss(NextInstruction == DELAY_SLOT,PROGRAM_COUNTER); DoTLBMiss(NextInstruction == DELAY_SLOT,PROGRAM_COUNTER);
@ -235,7 +235,7 @@ void CRecompiler::RecompilerMain_VirtualTable_validate()
} }
} }
g_Notify->BreakPoint(__FILE__, __LINE__); g_Notify->BreakPoint(__FILE__, __LINE__);
#ifdef tofix #ifdef legacycode
if (!g_TLB->ValidVaddr(PROGRAM_COUNTER)) if (!g_TLB->ValidVaddr(PROGRAM_COUNTER))
{ {
DoTLBMiss(NextInstruction == DELAY_SLOT,PROGRAM_COUNTER); DoTLBMiss(NextInstruction == DELAY_SLOT,PROGRAM_COUNTER);
@ -384,7 +384,7 @@ void CRecompiler::RecompilerMain_Lookup()
/*if (bUseTlb()) /*if (bUseTlb())
{ {
g_Notify->BreakPoint(__FILE__, __LINE__); g_Notify->BreakPoint(__FILE__, __LINE__);
#ifdef tofix #ifdef legacycode
if (!g_TLB->TranslateVaddr(PROGRAM_COUNTER, Addr)) if (!g_TLB->TranslateVaddr(PROGRAM_COUNTER, Addr))
{ {
DoTLBMiss(NextInstruction == DELAY_SLOT,PROGRAM_COUNTER); DoTLBMiss(NextInstruction == DELAY_SLOT,PROGRAM_COUNTER);
@ -497,7 +497,7 @@ void CRecompiler::RecompilerMain_Lookup()
} }
} }
g_Notify->BreakPoint(__FILE__, __LINE__); g_Notify->BreakPoint(__FILE__, __LINE__);
#ifdef tofix #ifdef legacycode
if (Profiling && IndvidualBlock) { if (Profiling && IndvidualBlock) {
static uint32_t ProfAddress = 0; static uint32_t ProfAddress = 0;
@ -736,7 +736,7 @@ void CRecompiler::ResetRecompCode(bool bAllocate)
void CRecompiler::RecompilerMain_ChangeMemory() void CRecompiler::RecompilerMain_ChangeMemory()
{ {
g_Notify->BreakPoint(__FILE__, __LINE__); g_Notify->BreakPoint(__FILE__, __LINE__);
#ifdef tofix #ifdef legacycode
uint32_t Value, Addr; uint32_t Value, Addr;
uint8_t * Block; uint8_t * Block;

View File

@ -25,7 +25,7 @@ CJumpInfo::CJumpInfo()
ExitReason = CExitInfo::Normal; ExitReason = CExitInfo::Normal;
} }
#ifdef tofix #ifdef legacycode
bool CCodeSection::IsAllParentLoops(CCodeSection * Parent, bool IgnoreIfCompiled, uint32_t Test) bool CCodeSection::IsAllParentLoops(CCodeSection * Parent, bool IgnoreIfCompiled, uint32_t Test)
{ {

View File

@ -138,7 +138,7 @@ bool CDumpMemory::DumpMemory(LPCSTR FileName, DumpFormat Format, DWORD StartPC,
LogFile.SetFlush(false); LogFile.SetFlush(false);
LogFile.SetTruncateFile(false); LogFile.SetTruncateFile(false);
g_Notify->BreakPoint(__FILE__, __LINE__); g_Notify->BreakPoint(__FILE__, __LINE__);
#ifdef tofix #ifdef legacycode
char Command[200]; char Command[200];
for (COpcode OpCode(StartPC); OpCode.PC() < EndPC; OpCode.Next()) for (COpcode OpCode(StartPC); OpCode.PC() < EndPC; OpCode.Next())
{ {