aboutsummaryrefslogtreecommitdiff
path: root/qtmips_machine
diff options
context:
space:
mode:
authorPavel Pisa <pisa@cmp.felk.cvut.cz>2019-02-07 00:12:04 +0100
committerPavel Pisa <pisa@cmp.felk.cvut.cz>2019-02-07 00:12:04 +0100
commitcf8c2cfcfc3477fa5434f041c38ef025844c5f60 (patch)
treee14ce73d1ed02c2013684e5c463bff9d385bdcd2 /qtmips_machine
parentb232bb867c1ac8cb7369190e8cd4f9f7af425cd1 (diff)
downloadqtmips-cf8c2cfcfc3477fa5434f041c38ef025844c5f60.tar.gz
qtmips-cf8c2cfcfc3477fa5434f041c38ef025844c5f60.tar.bz2
qtmips-cf8c2cfcfc3477fa5434f041c38ef025844c5f60.zip
Correct BLTZAL and BGEZAL execution to pass unmodified value to R31.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Diffstat (limited to 'qtmips_machine')
-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 9eae5f3..8aea469 100644
--- a/qtmips_machine/instruction.cpp
+++ b/qtmips_machine/instruction.cpp
@@ -100,7 +100,7 @@ static const struct InstructionMap alu_instruction_map[] = {
.flags = FLAGS_ALU_T_R_STD_SHV},
{"JR", IT_R, ALU_OP_JR, NOMEM, nullptr,
.flags = IMF_SUPPORTED | IMF_BJR_REQ_RS | IMF_JUMP},
- {"JALR", IT_R, ALU_OP_JALR, NOMEM, nullptr,
+ {"JALR", IT_R, ALU_OP_PASS_T, NOMEM, nullptr,
.flags = IMF_SUPPORTED | IMF_REGD | IMF_REGWRITE | IMF_BJR_REQ_RS | IMF_PC8_TO_RT | IMF_JUMP},
{"MOVZ", IT_R, ALU_OP_MOVZ, NOMEM, nullptr,
.flags = FLAGS_ALU_T_R_STD},
@@ -187,9 +187,9 @@ static const struct InstructionMap regimm_instruction_map[] = {
{"TNEI", IT_I, NOALU, NOMEM, nullptr, // TNEI
.flags = IMF_BJR_REQ_RS},
IM_UNKNOWN,
- {"BLTZAL", IT_I, NOALU, NOMEM, nullptr, // BLTZAL
+ {"BLTZAL", IT_I, ALU_OP_PASS_T, NOMEM, nullptr, // BLTZAL
.flags = FLAGS_J_B_PC_TO_R31 | IMF_BJR_REQ_RS | IMF_BRANCH},
- {"BGEZAL", IT_I, NOALU, NOMEM, nullptr, // BGEZAL
+ {"BGEZAL", IT_I, ALU_OP_PASS_T, NOMEM, nullptr, // BGEZAL
.flags = FLAGS_J_B_PC_TO_R31 | IMF_BJR_REQ_RS | IMF_BRANCH | IMF_BJ_NOT},
{"BLTZALL", IT_I, NOALU, NOMEM, nullptr, // BLTZALL
.flags = IMF_BJR_REQ_RS},