aboutsummaryrefslogtreecommitdiff
path: root/qtmips_machine/alu.cpp
diff options
context:
space:
mode:
authorPavel Pisa <pisa@cmp.felk.cvut.cz>2019-02-07 10:53:37 +0100
committerPavel Pisa <pisa@cmp.felk.cvut.cz>2019-02-07 10:53:37 +0100
commit4b91acba17a4d3a3205e99da5d69844a83da2c43 (patch)
treee3e1f6ef7375d9f6b931f56a5ab3aa9d8f6d560c /qtmips_machine/alu.cpp
parent01147f6f0855a1be9ded74995328d03bc9463b46 (diff)
downloadqtmips-4b91acba17a4d3a3205e99da5d69844a83da2c43.tar.gz
qtmips-4b91acba17a4d3a3205e99da5d69844a83da2c43.tar.bz2
qtmips-4b91acba17a4d3a3205e99da5d69844a83da2c43.zip
Implement BSHFL instruction and ignore RDHWR instruction.
Diffstat (limited to 'qtmips_machine/alu.cpp')
-rw-r--r--qtmips_machine/alu.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/qtmips_machine/alu.cpp b/qtmips_machine/alu.cpp
index 8016444..2ac27a5 100644
--- a/qtmips_machine/alu.cpp
+++ b/qtmips_machine/alu.cpp
@@ -128,6 +128,8 @@ std::uint32_t machine::alu_operate(enum AluOp operation, std::uint32_t s, std::u
return (s < t) ? 1 : 0;
case ALU_OP_LUI:
return t << 16;
+ case ALU_OP_BSHFL:
+ return (uint32_t)(int32_t)(int8_t)t;
case ALU_OP_PASS_T: // Pass s argument without change for JAL
return t;
case ALU_OP_BREAK: