rvemu

RISC-V RV32I execution engine
git clone git://mcdim.xyz/revemu.git
Log | Files | Refs

commit 90fddd88f9e4a9dfc9aed846dd8572c3b6a2ec8f
parent 823377596d6d32a2f8eb7326c21d7da6bcbba945
Author: Michail Konstantinos Dimopoulos <mk@mcdim.xyz>
Date:   Thu,  3 Sep 2026 06:56:38 +0300

Fixed ssli bug

Diffstat:
Mdisasm.c | 2+-
Mmain.c | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/disasm.c b/disasm.c @@ -16,7 +16,7 @@ static void disasm_itype(uint32_t inst) { printf("addi"); break; case 0x1: - if (i.funct7 != 0x00) { + if (i.funct7 == 0x00) { printf("slli"); } else { printf("Illegal funct7\n"); diff --git a/main.c b/main.c @@ -101,7 +101,7 @@ static void exec_itype(cpu_state_t *cpu, uint32_t inst, uint8_t *mem) { x = cpu->x[i.rs1]+i.imm; break; case 0x1: - if (i.funct7 != 0x00) { + if (i.funct7 == 0x00) { shamt = i.imm & 31; x = cpu->x[i.rs1] << shamt; } else {