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

Function MipsGetRegister

pcsx2/DebugTools/MipsAssembler.cpp:250–262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

248
249template<std::size_t SIZE>
250bool MipsGetRegister(const char* source, int& RetLen, MipsRegisterInfo& Result, const std::array<tMipsRegister, SIZE>& RegisterList)
251{
252 for (const auto& reg : RegisterList) {
253 if(strEquals(reg.name, source) && isValidRegisterTrail(source, strlen(reg.name)))
254 {
255 std::strncpy(Result.name, source, strlen(reg.name));
256 Result.num = reg.num;
257 RetLen = static_cast<int>(strlen(reg.name)); // grrr... should be unsigned!!
258 return true;
259 }
260 }
261 return false;
262}
263
264template<std::size_t SIZE>
265int MipsGetRegister(const char* source, int& RetLen, const std::array<tMipsRegister, SIZE>& RegisterList)

Callers 2

MipsCheckImmediateFunction · 0.85
LoadEncodingMethod · 0.85

Calls 2

strEqualsFunction · 0.85
isValidRegisterTrailFunction · 0.85

Tested by

no test coverage detected