From 482767bea82e89f7c984db3e8a0faa572c5ae592 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 8 Apr 2018 14:17:26 +0200 Subject: Fix some instruction string representation --- qtmips_machine/instruction.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'qtmips_machine') diff --git a/qtmips_machine/instruction.cpp b/qtmips_machine/instruction.cpp index a26cbf8..d87619b 100644 --- a/qtmips_machine/instruction.cpp +++ b/qtmips_machine/instruction.cpp @@ -258,8 +258,8 @@ QString Instruction::to_str() const { case T_I: res += im.name; if (im.flags & IMF_MEM) { - res += " $" + QString::number(rs()); - res += ", 0x" + QString::number(immediate(), 16).toUpper() + "(" + QString::number(rt()) + ")"; + res += " $" + QString::number(rt()); + res += ", 0x" + QString::number(immediate(), 16).toUpper() + "(" + QString::number(rs()) + ")"; } else { res += " $" + QString::number(rt()); if (!(im.flags & IMF_NO_RS)) @@ -270,7 +270,7 @@ QString Instruction::to_str() const { case T_J: res += im.name; // TODO we need to know instruction address to expand address section by it - res += " " + QString::number(address(), 16).toUpper(); + res += " 0x" + QString::number(address(), 16).toUpper(); break; case T_R: { -- cgit v1.2.3