Added CSRRSI
This commit is contained in:
parent
608dbba6a0
commit
256a56f70e
@ -570,7 +570,9 @@ static void cpu_execute(rv32_cpu_t* cpu, instruction_t* instruction)
|
|||||||
cpu->regs.x[instruction->rd] = csrrwi_old_value;
|
cpu->regs.x[instruction->rd] = csrrwi_old_value;
|
||||||
break;
|
break;
|
||||||
case FUNC3_CSRRSI:
|
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;
|
break;
|
||||||
case FUNC3_CSRRCI:
|
case FUNC3_CSRRCI:
|
||||||
// CSR atomic Read and Clear bits Immediate (immediate in rs1)
|
// CSR atomic Read and Clear bits Immediate (immediate in rs1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user