From eb217996098ffb5706cfe0ca8ffa4478b73ceb8e Mon Sep 17 00:00:00 2001 From: Pavel Pisa Date: Fri, 15 Feb 2019 15:23:56 +0100 Subject: Implement EXT instruction used in GLIBC startup. It requires one more field to pass to ALU. Signed-off-by: Pavel Pisa --- qtmips_machine/core.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'qtmips_machine/core.cpp') 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; -- cgit v1.2.3