From d03863f5a211809db49da118f7e0d754abc65e51 Mon Sep 17 00:00:00 2001 From: taitep Date: Sun, 21 Dec 2025 14:00:47 +0100 Subject: Implement SLLI and fix sign extension of immediates for I-type and S-type instructions --- src/instructions.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/instructions.rs') diff --git a/src/instructions.rs b/src/instructions.rs index bfedaee..fc270dc 100644 --- a/src/instructions.rs +++ b/src/instructions.rs @@ -16,6 +16,11 @@ pub(crate) fn find_and_exec(instr: Instruction, core: &mut Core) -> Option match instr.funct3() { // OP_IMM 0b000 => Some(rvi::addi(core, instr)), + 0b001 => match instr.funct6() { + // left-shift immediate + 0b000000 => Some(rvi::slli(core, instr)), + _ => None, + }, _ => None, }, 0b00110 => match instr.funct3() { -- cgit v1.2.3