From 3f11cd84cac1260002476504d1592e260449e7db Mon Sep 17 00:00:00 2001 From: Anton Lydike Date: Sun, 23 May 2021 12:58:47 +0200 Subject: [PATCH] [decoder] fixed error with decoding slli type instructions --- riscemu/decoder/formats.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/riscemu/decoder/formats.py b/riscemu/decoder/formats.py index aaafb06..ccca92f 100644 --- a/riscemu/decoder/formats.py +++ b/riscemu/decoder/formats.py @@ -96,8 +96,7 @@ def decode_j(ins: int) -> List[Union[str, int]]: def decode_i_shamt(ins: int) -> List[Union[str, int]]: if funct3(ins) in (1, 5): return [RISCV_REGS[rd(ins)], RISCV_REGS[rs1(ins)], rs2(ins)] - else: - return [RISCV_REGS[rd(ins)], RISCV_REGS[rs1(ins)], imm110(ins)] + return decode_i(ins) INSTRUCTION_ARGS_DECODER: Dict[int, Callable[[int], List[Union[str, int]]]] = {