aboutsummaryrefslogtreecommitdiff
path: root/qtmips_machine/core.cpp
diff options
context:
space:
mode:
authorPavel Pisa <pisa@cmp.felk.cvut.cz>2019-02-15 15:23:56 +0100
committerPavel Pisa <pisa@cmp.felk.cvut.cz>2019-02-15 15:23:56 +0100
commiteb217996098ffb5706cfe0ca8ffa4478b73ceb8e (patch)
treeb968a4edf276d5f2cf9db422f455774bf7a7061d /qtmips_machine/core.cpp
parentab9ddf2beb8a266dd31e31178c53616b79ce4428 (diff)
downloadqtmips-eb217996098ffb5706cfe0ca8ffa4478b73ceb8e.tar.gz
qtmips-eb217996098ffb5706cfe0ca8ffa4478b73ceb8e.tar.bz2
qtmips-eb217996098ffb5706cfe0ca8ffa4478b73ceb8e.zip
Implement EXT instruction used in GLIBC startup.
It requires one more field to pass to ALU. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Diffstat (limited to 'qtmips_machine/core.cpp')
-rw-r--r--qtmips_machine/core.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/qtmips_machine/core.cpp b/qtmips_machine/core.cpp
index b80e297..dccc20b 100644
--- a/qtmips_machine/core.cpp
+++ b/qtmips_machine/core.cpp
@@ -322,7 +322,8 @@ struct Core::dtExecute Core::execute(const struct dtDecode &dt) {
if (dt.alusrc)
alu_sec = dt.immediate_val; // Sign or zero extend immediate value
- std::uint32_t alu_val = alu_operate(dt.aluop, dt.val_rs, alu_sec, dt.inst.shamt(), regs, discard);
+ std::uint32_t alu_val = alu_operate(dt.aluop, dt.val_rs, alu_sec,
+ dt.inst.shamt(), dt.inst.rd(), regs, discard);
if (discard)
regwrite = false;