mirror of https://github.com/PCSX2/pcsx2.git
Remove redundant Disr5900
This commit is contained in:
parent
9284a01346
commit
2d7ef30e59
|
@ -269,7 +269,6 @@ set(pcsx2DebugToolsSources
|
|||
DebugTools/SymbolMap.cpp
|
||||
DebugTools/DisR3000A.cpp
|
||||
DebugTools/DisR5900asm.cpp
|
||||
DebugTools/DisR5900.cpp
|
||||
DebugTools/DisVU0Micro.cpp
|
||||
DebugTools/DisVU1Micro.cpp)
|
||||
|
||||
|
|
|
@ -411,7 +411,6 @@ void MFC0()
|
|||
{
|
||||
// Note on _Rd_ Condition 9: CP0.Count should be updated even if _Rt_ is 0.
|
||||
if ((_Rd_ != 9) && !_Rt_ ) return;
|
||||
if (_Rd_ != 9) { COP0_LOG("%s", disR5900Current.getCString() ); }
|
||||
|
||||
//if(bExecBIOS == FALSE && _Rd_ == 25) Console.WriteLn("MFC0 _Rd_ %x = %x", _Rd_, cpuRegs.CP0.r[_Rd_]);
|
||||
switch (_Rd_)
|
||||
|
@ -461,7 +460,6 @@ void MFC0()
|
|||
|
||||
void MTC0()
|
||||
{
|
||||
COP0_LOG("%s\n", disR5900Current.getCString());
|
||||
//if(bExecBIOS == FALSE && _Rd_ == 25) Console.WriteLn("MTC0 _Rd_ %x = %x", _Rd_, cpuRegs.CP0.r[_Rd_]);
|
||||
switch (_Rd_)
|
||||
{
|
||||
|
|
|
@ -26,42 +26,17 @@ extern char* disVU0MicroLF(u32 code, u32 pc);
|
|||
extern char* disVU1MicroUF(u32 code, u32 pc);
|
||||
extern char* disVU1MicroLF(u32 code, u32 pc);
|
||||
|
||||
extern const char * const CP2VFnames[];
|
||||
extern const char * const disRNameCP2f[];
|
||||
extern const char * const disRNameCP2i[];
|
||||
|
||||
extern const char * const disRNameCP2f[];
|
||||
extern const char * const disRNameCP2i[];
|
||||
|
||||
namespace R5900
|
||||
{
|
||||
// [TODO] : These function names can be de-obfuscated with the help of a little namespace love.
|
||||
|
||||
void disR5900F( std::string& output, u32 code );
|
||||
void disR5900Fasm( std::string& output, u32 code, u32 pc);
|
||||
void disR5900AddSym(u32 addr, const char *name);
|
||||
const char* disR5900GetSym(u32 addr);
|
||||
const char* disR5900GetUpperSym(u32 addr);
|
||||
void disR5900FreeSyms();
|
||||
void dFindSym( std::string& output, u32 addr );
|
||||
|
||||
extern const char * const disRNameGPR[];
|
||||
extern const char * const disRNameCP0[];
|
||||
extern const char * const disRNameCP1[];
|
||||
|
||||
// A helper class for getting a quick and efficient string representation of the
|
||||
// R5900's current instruction. This class is *not* thread safe!
|
||||
class DisR5900CurrentState
|
||||
{
|
||||
protected:
|
||||
std::string result;
|
||||
|
||||
public:
|
||||
const std::string& getString();
|
||||
const char* getCString();
|
||||
};
|
||||
|
||||
extern DisR5900CurrentState disR5900Current;
|
||||
extern const char * const GPR_REG[32];
|
||||
extern const char * const COP0_REG[32];
|
||||
extern const char * const COP1_REG_FP[32];
|
||||
extern const char * const COP1_REG_FCR[32];
|
||||
extern const char * const COP2_REG_FP[32];
|
||||
extern const char * const COP2_REG_CTL[32];
|
||||
extern const char * const COP2_VFnames[4];
|
||||
}
|
||||
|
||||
namespace R3000A
|
||||
|
|
|
@ -353,16 +353,16 @@ const char* R5900DebugInterface::getRegisterName(int cat, int num)
|
|||
case 34: // lo
|
||||
return "lo";
|
||||
default:
|
||||
return R5900::disRNameGPR[num];
|
||||
return R5900::GPR_REG[num];
|
||||
}
|
||||
case EECAT_CP0:
|
||||
return R5900::disRNameCP0[num];
|
||||
return R5900::COP0_REG[num];
|
||||
case EECAT_CP1:
|
||||
return R5900::disRNameCP1[num];
|
||||
return R5900::COP1_REG_FP[num];
|
||||
case EECAT_CP2F:
|
||||
return disRNameCP2f[num];
|
||||
return R5900::COP2_REG_FP[num];
|
||||
case EECAT_CP2I:
|
||||
return disRNameCP2i[num];
|
||||
return R5900::COP2_REG_CTL[num];
|
||||
default:
|
||||
return "Invalid";
|
||||
}
|
||||
|
@ -644,7 +644,7 @@ const char* R3000DebugInterface::getRegisterName(int cat, int num)
|
|||
case 34: // lo
|
||||
return "lo";
|
||||
default:
|
||||
return R5900::disRNameGPR[num];
|
||||
return R5900::GPR_REG[num];
|
||||
}
|
||||
default:
|
||||
return "Invalid";
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -99,6 +99,8 @@ static const char * const COP2_REG_CTL[32] ={
|
|||
"c2c24","c2c25","TPC","CMSAR0","FBRST","VPU-STAT","c2c30","CMSAR1"
|
||||
};
|
||||
|
||||
const char * const R5900::COP2_VFnames[4] = { "x", "y", "z", "w" };
|
||||
|
||||
void P_COP2_Unknown( std::string& output );
|
||||
void P_COP2_SPECIAL2( std::string& output );
|
||||
void P_COP2_SPECIAL( std::string& output );
|
||||
|
|
|
@ -46,15 +46,15 @@ typedef char* (*TdisR5900F)DisFInterface;
|
|||
#define dNameU(i) { char op[256]; sprintf(op, "%s.%s%s%s%s", i, _X ? "x" : "", _Y ? "y" : "", _Z ? "z" : "", _W ? "w" : ""); sprintf(ostr, "%s %-7s,", ostr, op); }
|
||||
|
||||
|
||||
#define dCP2128f(i) sprintf(ostr, "%s w=%f z=%f y=%f x=%f (%s),", ostr, VU0.VF[i].f.w, VU0.VF[i].f.z, VU0.VF[i].f.y, VU0.VF[i].f.x, disRNameCP2f[i])
|
||||
#define dCP232x(i) sprintf(ostr, "%s x=%f (%s),", ostr, VU0.VF[i].f.x, disRNameCP2f[i])
|
||||
#define dCP232y(i) sprintf(ostr, "%s y=%f (%s),", ostr, VU0.VF[i].f.y, disRNameCP2f[i])
|
||||
#define dCP232z(i) sprintf(ostr, "%s z=%f (%s),", ostr, VU0.VF[i].f.z, disRNameCP2f[i])
|
||||
#define dCP232w(i) sprintf(ostr, "%s w=%f (%s),", ostr, VU0.VF[i].f.w, disRNameCP2f[i])
|
||||
#define dCP2128f(i) sprintf(ostr, "%s w=%f z=%f y=%f x=%f (%s),", ostr, VU0.VF[i].f.w, VU0.VF[i].f.z, VU0.VF[i].f.y, VU0.VF[i].f.x, R5900::COP2_REG_FP[i])
|
||||
#define dCP232x(i) sprintf(ostr, "%s x=%f (%s),", ostr, VU0.VF[i].f.x, R5900::COP2_REG_FP[i])
|
||||
#define dCP232y(i) sprintf(ostr, "%s y=%f (%s),", ostr, VU0.VF[i].f.y, R5900::COP2_REG_FP[i])
|
||||
#define dCP232z(i) sprintf(ostr, "%s z=%f (%s),", ostr, VU0.VF[i].f.z, R5900::COP2_REG_FP[i])
|
||||
#define dCP232w(i) sprintf(ostr, "%s w=%f (%s),", ostr, VU0.VF[i].f.w, R5900::COP2_REG_FP[i])
|
||||
#define dCP2ACCf() sprintf(ostr, "%s w=%f z=%f y=%f x=%f (ACC),", ostr, VU0.ACC.f.w, VU0.ACC.f.z, VU0.ACC.f.y, VU0.ACC.f.x)
|
||||
#define dCP232i(i) sprintf(ostr, "%s %8.8x (%s),", ostr, VU0.VI[i].UL, disRNameCP2i[i])
|
||||
#define dCP232iF(i) sprintf(ostr, "%s %f (%s),", ostr, VU0.VI[i].F, disRNameCP2i[i])
|
||||
#define dCP232f(i, j) sprintf(ostr, "%s Q %s=%f (%s),", ostr, CP2VFnames[j], VU0.VF[i].F[j], disRNameCP2f[i])
|
||||
#define dCP232i(i) sprintf(ostr, "%s %8.8x (%s),", ostr, VU0.VI[i].UL, R5900::COP2_REG_CTL[i])
|
||||
#define dCP232iF(i) sprintf(ostr, "%s %f (%s),", ostr, VU0.VI[i].F, R5900::COP2_REG_CTL[i])
|
||||
#define dCP232f(i, j) sprintf(ostr, "%s Q %s=%f (%s),", ostr, R5900::COP2_VFnames[j], VU0.VF[i].F[j], R5900::COP2_REG_FP[i])
|
||||
#define dImm5() sprintf(ostr, "%s %d,", ostr, (code >> 6) & 0x1f)
|
||||
#define dImm11() sprintf(ostr, "%s %d,", ostr, code & 0x7ff)
|
||||
#define dImm15() sprintf(ostr, "%s %d,", ostr, ( ( code >> 10 ) & 0x7800 ) | ( code & 0x7ff ))
|
||||
|
|
|
@ -52,28 +52,28 @@ typedef char* (*TdisR5900F)DisFInterface;
|
|||
}
|
||||
|
||||
#define dCP2128f(i) { \
|
||||
if( !CpuVU1->IsInterpreter ) sprintf(ostr, "%s %s,", ostr, disRNameCP2f[i]); \
|
||||
else sprintf(ostr, "%s w=%f (%8.8x) z=%f (%8.8x) y=%f (%8.8xl) x=%f (%8.8x) (%s),", ostr, VU1.VF[i].f.w, VU1.VF[i].UL[3], VU1.VF[i].f.z, VU1.VF[i].UL[2], VU1.VF[i].f.y, VU1.VF[i].UL[1], VU1.VF[i].f.x, VU1.VF[i].UL[0], disRNameCP2f[i]); \
|
||||
if( !CpuVU1->IsInterpreter ) sprintf(ostr, "%s %s,", ostr, R5900::COP2_REG_FP[i]); \
|
||||
else sprintf(ostr, "%s w=%f (%8.8x) z=%f (%8.8x) y=%f (%8.8xl) x=%f (%8.8x) (%s),", ostr, VU1.VF[i].f.w, VU1.VF[i].UL[3], VU1.VF[i].f.z, VU1.VF[i].UL[2], VU1.VF[i].f.y, VU1.VF[i].UL[1], VU1.VF[i].f.x, VU1.VF[i].UL[0], R5900::COP2_REG_FP[i]); \
|
||||
} \
|
||||
|
||||
#define dCP232x(i) { \
|
||||
if( !CpuVU1->IsInterpreter ) sprintf(ostr, "%s %s,", ostr, disRNameCP2f[i]); \
|
||||
else sprintf(ostr, "%s x=%f (%s),", ostr, VU1.VF[i].f.x, disRNameCP2f[i]); \
|
||||
if( !CpuVU1->IsInterpreter ) sprintf(ostr, "%s %s,", ostr, R5900::COP2_REG_FP[i]); \
|
||||
else sprintf(ostr, "%s x=%f (%s),", ostr, VU1.VF[i].f.x, R5900::COP2_REG_FP[i]); \
|
||||
} \
|
||||
|
||||
#define dCP232y(i) { \
|
||||
if( !CpuVU1->IsInterpreter ) sprintf(ostr, "%s %s,", ostr, disRNameCP2f[i]); \
|
||||
else sprintf(ostr, "%s y=%f (%s),", ostr, VU1.VF[i].f.y, disRNameCP2f[i]); \
|
||||
if( !CpuVU1->IsInterpreter ) sprintf(ostr, "%s %s,", ostr, R5900::COP2_REG_FP[i]); \
|
||||
else sprintf(ostr, "%s y=%f (%s),", ostr, VU1.VF[i].f.y, R5900::COP2_REG_FP[i]); \
|
||||
} \
|
||||
|
||||
#define dCP232z(i) { \
|
||||
if( !CpuVU1->IsInterpreter ) sprintf(ostr, "%s %s,", ostr, disRNameCP2f[i]); \
|
||||
else sprintf(ostr, "%s z=%f (%s),", ostr, VU1.VF[i].f.z, disRNameCP2f[i]); \
|
||||
if( !CpuVU1->IsInterpreter ) sprintf(ostr, "%s %s,", ostr, R5900::COP2_REG_FP[i]); \
|
||||
else sprintf(ostr, "%s z=%f (%s),", ostr, VU1.VF[i].f.z, R5900::COP2_REG_FP[i]); \
|
||||
}
|
||||
|
||||
#define dCP232w(i) { \
|
||||
if( !CpuVU1->IsInterpreter ) sprintf(ostr, "%s %s,", ostr, disRNameCP2f[i]); \
|
||||
else sprintf(ostr, "%s w=%f (%s),", ostr, VU1.VF[i].f.w, disRNameCP2f[i]); \
|
||||
if( !CpuVU1->IsInterpreter ) sprintf(ostr, "%s %s,", ostr, R5900::COP2_REG_FP[i]); \
|
||||
else sprintf(ostr, "%s w=%f (%s),", ostr, VU1.VF[i].f.w, R5900::COP2_REG_FP[i]); \
|
||||
}
|
||||
|
||||
#define dCP2ACCf() { \
|
||||
|
@ -82,18 +82,18 @@ typedef char* (*TdisR5900F)DisFInterface;
|
|||
} \
|
||||
|
||||
#define dCP232i(i) { \
|
||||
if( !CpuVU1->IsInterpreter ) sprintf(ostr, "%s %s,", ostr, disRNameCP2i[i]); \
|
||||
else sprintf(ostr, "%s %8.8x (%s),", ostr, VU1.VI[i].UL, disRNameCP2i[i]); \
|
||||
if( !CpuVU1->IsInterpreter ) sprintf(ostr, "%s %s,", ostr, R5900::COP2_REG_CTL[i]); \
|
||||
else sprintf(ostr, "%s %8.8x (%s),", ostr, VU1.VI[i].UL, R5900::COP2_REG_CTL[i]); \
|
||||
}
|
||||
|
||||
#define dCP232iF(i) { \
|
||||
if( !CpuVU1->IsInterpreter ) sprintf(ostr, "%s %s,", ostr, disRNameCP2i[i]); \
|
||||
else sprintf(ostr, "%s %f (%s),", ostr, VU1.VI[i].F, disRNameCP2i[i]); \
|
||||
if( !CpuVU1->IsInterpreter ) sprintf(ostr, "%s %s,", ostr, R5900::COP2_REG_CTL[i]); \
|
||||
else sprintf(ostr, "%s %f (%s),", ostr, VU1.VI[i].F, R5900::COP2_REG_CTL[i]); \
|
||||
}
|
||||
|
||||
#define dCP232f(i, j) { \
|
||||
if( !CpuVU1->IsInterpreter ) sprintf(ostr, "%s %s%s,", ostr, disRNameCP2f[i], CP2VFnames[j]); \
|
||||
else sprintf(ostr, "%s %s=%f (%s),", ostr, CP2VFnames[j], VU1.VF[i].F[j], disRNameCP2f[i]); \
|
||||
if( !CpuVU1->IsInterpreter ) sprintf(ostr, "%s %s%s,", ostr, R5900::COP2_REG_FP[i], R5900::COP2_VFnames[j]); \
|
||||
else sprintf(ostr, "%s %s=%f (%s),", ostr, R5900::COP2_VFnames[j], VU1.VF[i].F[j], R5900::COP2_REG_FP[i]); \
|
||||
}
|
||||
|
||||
#define dImm5() sprintf(ostr, "%s %d,", ostr, (s16)((code >> 6) & 0x10 ? 0xfff0 | ((code >> 6) & 0xf) : (code >> 6) & 0xf))
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include "iCore.h"
|
||||
#include "iR5900.h"
|
||||
#include "IPU/IPU.h"
|
||||
#include "DebugTools/SymbolMap.h"
|
||||
|
||||
#include "AppConfig.h"
|
||||
#include "Utilities/AsciiFile.h"
|
||||
|
@ -210,9 +211,9 @@ void iDumpBlock( int startpc, u8 * ptr )
|
|||
Path::Combine( g_Conf->Folders.Logs, wxsFormat(L"R5900dump%.8X.txt", startpc) ), L"w"
|
||||
);
|
||||
|
||||
if( disR5900GetSym(startpc) != NULL )
|
||||
if (!symbolMap.GetLabelString(startpc).empty())
|
||||
{
|
||||
eff.Printf( disR5900GetSym( startpc ) );
|
||||
eff.Printf( symbolMap.GetLabelString(startpc).c_str() );
|
||||
eff.Printf( "\n" );
|
||||
}
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include "GS.h" // for sending game crc to mtgs
|
||||
#include "Elfheader.h"
|
||||
#include "DebugTools/SymbolMap.h"
|
||||
|
||||
u32 ElfCRC;
|
||||
u32 ElfEntry;
|
||||
|
@ -426,7 +427,7 @@ void ElfObject::loadSectionHeaders()
|
|||
for(uint i = 1; i < (secthead[i_st].sh_size / sizeof(Elf32_Sym)); i++) {
|
||||
if ((eS[i].st_value != 0) && (ELF32_ST_TYPE(eS[i].st_info) == 2))
|
||||
{
|
||||
R5900::disR5900AddSym(eS[i].st_value, &SymNames[eS[i].st_name]);
|
||||
symbolMap.AddLabel(&SymNames[eS[i].st_name],eS[i].st_value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -529,7 +530,7 @@ int GetPS2ElfName( wxString& name )
|
|||
if (buffer[i] == 0) break;
|
||||
buffer[i] = 0;
|
||||
|
||||
R5900::disR5900AddSym(addr, buffer);
|
||||
symbolMap.AddLabel(buffer,addr);
|
||||
}
|
||||
fclose(fp);
|
||||
#endif
|
||||
|
|
|
@ -583,7 +583,6 @@
|
|||
<ClCompile Include="..\..\GSState.cpp" />
|
||||
<ClCompile Include="..\..\MTGS.cpp" />
|
||||
<ClCompile Include="..\..\DebugTools\DisR3000A.cpp" />
|
||||
<ClCompile Include="..\..\DebugTools\DisR5900.cpp" />
|
||||
<ClCompile Include="..\..\DebugTools\DisR5900asm.cpp" />
|
||||
<ClCompile Include="..\..\DebugTools\DisVU0Micro.cpp" />
|
||||
<ClCompile Include="..\..\DebugTools\DisVU1Micro.cpp" />
|
||||
|
|
|
@ -545,9 +545,6 @@
|
|||
<ClCompile Include="..\..\DebugTools\DisR3000A.cpp">
|
||||
<Filter>System\Ps2\Debug</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\DebugTools\DisR5900.cpp">
|
||||
<Filter>System\Ps2\Debug</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\DebugTools\DisR5900asm.cpp">
|
||||
<Filter>System\Ps2\Debug</Filter>
|
||||
</ClCompile>
|
||||
|
|
|
@ -569,7 +569,6 @@
|
|||
<ClCompile Include="..\..\GSState.cpp" />
|
||||
<ClCompile Include="..\..\MTGS.cpp" />
|
||||
<ClCompile Include="..\..\DebugTools\DisR3000A.cpp" />
|
||||
<ClCompile Include="..\..\DebugTools\DisR5900.cpp" />
|
||||
<ClCompile Include="..\..\DebugTools\DisR5900asm.cpp" />
|
||||
<ClCompile Include="..\..\DebugTools\DisVU0Micro.cpp" />
|
||||
<ClCompile Include="..\..\DebugTools\DisVU1Micro.cpp" />
|
||||
|
|
|
@ -542,9 +542,6 @@
|
|||
<ClCompile Include="..\..\DebugTools\DisR3000A.cpp">
|
||||
<Filter>System\Ps2\Debug</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\DebugTools\DisR5900.cpp">
|
||||
<Filter>System\Ps2\Debug</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\DebugTools\DisR5900asm.cpp">
|
||||
<Filter>System\Ps2\Debug</Filter>
|
||||
</ClCompile>
|
||||
|
|
|
@ -569,7 +569,6 @@
|
|||
<ClCompile Include="..\..\GSState.cpp" />
|
||||
<ClCompile Include="..\..\MTGS.cpp" />
|
||||
<ClCompile Include="..\..\DebugTools\DisR3000A.cpp" />
|
||||
<ClCompile Include="..\..\DebugTools\DisR5900.cpp" />
|
||||
<ClCompile Include="..\..\DebugTools\DisR5900asm.cpp" />
|
||||
<ClCompile Include="..\..\DebugTools\DisVU0Micro.cpp" />
|
||||
<ClCompile Include="..\..\DebugTools\DisVU1Micro.cpp" />
|
||||
|
|
|
@ -542,9 +542,6 @@
|
|||
<ClCompile Include="..\..\DebugTools\DisR3000A.cpp">
|
||||
<Filter>System\Ps2\Debug</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\DebugTools\DisR5900.cpp">
|
||||
<Filter>System\Ps2\Debug</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\DebugTools\DisR5900asm.cpp">
|
||||
<Filter>System\Ps2\Debug</Filter>
|
||||
</ClCompile>
|
||||
|
|
Loading…
Reference in New Issue