diff --git a/src/cpu/rv32cpu.c b/src/cpu/rv32cpu.c index 1028e6a..bea9c9c 100644 --- a/src/cpu/rv32cpu.c +++ b/src/cpu/rv32cpu.c @@ -570,7 +570,9 @@ static void cpu_execute(rv32_cpu_t* cpu, instruction_t* instruction) cpu->regs.x[instruction->rd] = csrrwi_old_value; break; case FUNC3_CSRRSI: - fprintf(stderr, "CSRRSI\n"); + // CSR atomic Read and Set bits immediate + cpu->regs.x[instruction->rd] = cpu->csr[instruction->immediate]; + cpu->csr[instruction->immediate] |= instruction->rs1; break; case FUNC3_CSRRCI: // CSR atomic Read and Clear bits Immediate (immediate in rs1)