|
|
|
@ -559,7 +559,10 @@ static void cpu_execute(rv32_cpu_t* cpu, instruction_t* instruction) |
|
|
|
|
fprintf(stderr, "CSRRC\n"); |
|
|
|
|
break; |
|
|
|
|
case FUNC3_CSRRWI: |
|
|
|
|
fprintf(stderr, "CSRRWI\n"); |
|
|
|
|
// CSR atomic Read/Write Immediate (immediate in rs1)
|
|
|
|
|
uint32_t csrrwi_old_value = cpu->csr[instruction->immediate]; |
|
|
|
|
cpu->csr[instruction->immediate] = instruction->rs1; |
|
|
|
|
cpu->regs.x[instruction->rd] = csrrwi_old_value; |
|
|
|
|
break; |
|
|
|
|
case FUNC3_CSRRSI: |
|
|
|
|
fprintf(stderr, "CSRRSI\n"); |
|
|
|
|