MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / disMemAccess

Function disMemAccess

pcsx2/DebugTools/DisR5900asm.cpp:887–913  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

885void DADDIU( std::string& output ) { _sap("daddiu\t%s, 0x%04X") disDestSource(DECODE_RT, DECODE_RS), DECODE_IMMED); }
886
887void disMemAccess( std::string& output, const char* name, int cop = 0)
888{
889 const char* rt;
890 switch (cop)
891 {
892 case 0:
893 rt = GPR_REG[DECODE_RT];
894 break;
895 case 1:
896 rt = COP1_REG_FP[DECODE_FT];
897 break;
898 case 2:
899 rt = COP2_REG_FP[DECODE_FT];
900 break;
901 default:
902 rt = "???";
903 break;
904 }
905
906 const char* rs = GPR_REG[DECODE_RS];
907 s16 imm = DECODE_IMMED;
908
909 if (disSimplify && imm == 0)
910 ssappendf(output, "%s\t%s,(%s)",name,rt,rs);
911 else
912 ssappendf(output, "%s\t%s, %s(%s)",name,rt,signedImmediate(imm,4),rs);
913}
914
915void LDL( std::string& output ) { disMemAccess(output,"ldl"); }
916void LDR( std::string& output ) { disMemAccess(output,"ldr"); }

Callers 15

LDLFunction · 0.85
LDRFunction · 0.85
LBFunction · 0.85
LHFunction · 0.85
LWLFunction · 0.85
LWFunction · 0.85
LBUFunction · 0.85
LHUFunction · 0.85
LWRFunction · 0.85
LWUFunction · 0.85
SBFunction · 0.85
SHFunction · 0.85

Calls 2

ssappendfFunction · 0.85
signedImmediateFunction · 0.85

Tested by

no test coverage detected