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

Function MipsAssembleOpcode

pcsx2/DebugTools/MipsAssembler.cpp:225–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223}
224
225bool MipsAssembleOpcode(const char* line, DebugInterface* cpu, u32 address, u32& dest, std::string& errorText)
226{
227 char name[64],args[256];
228 SplitLine(line,name,args);
229
230 CMipsInstruction opcode(cpu);
231 if (cpu == NULL || !opcode.Load(name,args,(int)address))
232 {
233 errorText = opcode.getErrorMessage();
234 return false;
235 }
236
237 if (!opcode.Validate())
238 {
239 errorText = "Parameter failure.";
240 return false;
241 }
242
243 opcode.Encode();
244 dest = opcode.getEncoding();
245
246 return true;
247}
248
249template<std::size_t SIZE>
250bool MipsGetRegister(const char* source, int& RetLen, MipsRegisterInfo& Result, const std::array<tMipsRegister, SIZE>& RegisterList)

Callers 2

Calls 6

SplitLineFunction · 0.85
getErrorMessageMethod · 0.80
LoadMethod · 0.45
ValidateMethod · 0.45
EncodeMethod · 0.45
getEncodingMethod · 0.45

Tested by

no test coverage detected