aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2018-01-17 14:49:40 +0100
committerKarel Kočí <cynerd@email.cz>2018-01-17 14:49:40 +0100
commit20ad720def253699a843f7c7a89be8a262622d5b (patch)
treebeda47106aef122ed26eac1ab6512fd2114a345d
parent5feb16d0738f57d220e5f2e6ba85e072c22135ee (diff)
downloadqtmips-20ad720def253699a843f7c7a89be8a262622d5b.tar.gz
qtmips-20ad720def253699a843f7c7a89be8a262622d5b.tar.bz2
qtmips-20ad720def253699a843f7c7a89be8a262622d5b.zip
Print I instruction immediate field in hexa
-rw-r--r--qtmips_machine/instruction.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qtmips_machine/instruction.cpp b/qtmips_machine/instruction.cpp
index 7ff35fe..c34ff3a 100644
--- a/qtmips_machine/instruction.cpp
+++ b/qtmips_machine/instruction.cpp
@@ -239,7 +239,7 @@ QString Instruction::to_str() const {
switch (im.type) {
case IT_I:
res += im.name;
- res += " $" + QString::number(rs()) + ", $" + QString::number(rt()) + ", " + QString::number(immediate());
+ res += " $" + QString::number(rs()) + ", $" + QString::number(rt()) + ", 0x" + QString::number(immediate(), 16);
break;
case IT_J:
res += im.name;