Merge pull request #1135 from FioraAeterna/twidisasmfix

Disassembler: fix disassembly of some twi instructions
This commit is contained in:
Ryan Houdek 2014-09-21 14:19:05 -05:00
commit 9206dd016e
1 changed files with 5 additions and 3 deletions

View File

@ -356,16 +356,18 @@ void GekkoDisassembler::trapi(u32 in, unsigned char dmode)
{ {
const char* cnd = trap_condition[PPCGETD(in)]; const char* cnd = trap_condition[PPCGETD(in)];
m_flags |= dmode;
if (cnd != nullptr) if (cnd != nullptr)
{ {
m_flags |= dmode;
m_opcode = StringFromFormat("t%c%s", dmode ? 'd' : 'w', cnd); m_opcode = StringFromFormat("t%c%s", dmode ? 'd' : 'w', cnd);
m_operands = imm(in, 0, 2, false);
} }
else else
{ {
ill(in); m_opcode = StringFromFormat("t%ci", dmode ? 'd' : 'w');
m_operands = StringFromFormat("%d, ", PPCGETD(in));
} }
m_operands += imm(in, 0, 2, false);
} }