diff options
Diffstat (limited to 'qtmips_machine')
-rw-r--r-- | qtmips_machine/instruction.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/qtmips_machine/instruction.cpp b/qtmips_machine/instruction.cpp index a0570fd..ed9064b 100644 --- a/qtmips_machine/instruction.cpp +++ b/qtmips_machine/instruction.cpp @@ -458,7 +458,7 @@ QString Instruction::to_str() const { res += " $" + QString::number(rt()); res += ", 0x" + QString::number(immediate(), 16).toUpper() + "(" + QString::number(rs()) + ")"; } else { - if (im.flags & (IMF_BJR_REQ_RT | IMF_ALU_REQ_RT | IMF_REGWRITE)) { + if (im.flags & IMF_REGWRITE) { res += next_delim + "$" + QString::number(rt()); next_delim = ", "; } @@ -466,6 +466,10 @@ QString Instruction::to_str() const { res += next_delim + "$" + QString::number(rs()); next_delim = ", "; } + if (im.flags & (IMF_BJR_REQ_RT | IMF_ALU_REQ_RT) && !(im.flags & IMF_REGWRITE)) { + res += next_delim + "$" + QString::number(rt()); + next_delim = ", "; + } res += next_delim + "0x" + QString::number(immediate(), 16).toUpper(); } break; |