| 223 | } |
| 224 | |
| 225 | bool 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 | |
| 249 | template<std::size_t SIZE> |
| 250 | bool MipsGetRegister(const char* source, int& RetLen, MipsRegisterInfo& Result, const std::array<tMipsRegister, SIZE>& RegisterList) |
no test coverage detected