diff options
author | Karel Kočí <cynerd@email.cz> | 2018-01-17 14:49:40 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2018-01-17 14:49:40 +0100 |
commit | 20ad720def253699a843f7c7a89be8a262622d5b (patch) | |
tree | beda47106aef122ed26eac1ab6512fd2114a345d | |
parent | 5feb16d0738f57d220e5f2e6ba85e072c22135ee (diff) | |
download | qtmips-20ad720def253699a843f7c7a89be8a262622d5b.tar.gz qtmips-20ad720def253699a843f7c7a89be8a262622d5b.tar.bz2 qtmips-20ad720def253699a843f7c7a89be8a262622d5b.zip |
Print I instruction immediate field in hexa
-rw-r--r-- | qtmips_machine/instruction.cpp | 2 |
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; |