aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2018-04-08 14:17:26 +0200
committerKarel Kočí <cynerd@email.cz>2018-04-08 14:17:26 +0200
commit482767bea82e89f7c984db3e8a0faa572c5ae592 (patch)
tree6d5e36e5b7dd89b23564188ca9169f56867c6089
parent376400e4b88ee4b6ca284a8dfce47c95921545fa (diff)
downloadqtmips-482767bea82e89f7c984db3e8a0faa572c5ae592.tar.gz
qtmips-482767bea82e89f7c984db3e8a0faa572c5ae592.tar.bz2
qtmips-482767bea82e89f7c984db3e8a0faa572c5ae592.zip
Fix some instruction string representation
-rw-r--r--qtmips_machine/instruction.cpp6
1 files changed, 3 insertions, 3 deletions
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:
{