This commit is contained in:
Blaise Tine
2022-02-05 17:58:12 -05:00
parent d297351211
commit 1bd25acb0b
2 changed files with 13 additions and 25 deletions

View File

@@ -502,6 +502,13 @@ std::shared_ptr<Instr> Decoder::decode(uint32_t code) const {
instr->setFunc7(func7);
switch (op) {
case Opcode::SYS_INST:
if (func3 != 0) {
// RV32I: CSR*
instr->setDestReg(rd, RegType::Integer);
}
// uint12
instr->setImm(code >> shift_rs2);
break;
case Opcode::FENCE:
// uint12
instr->setImm(code >> shift_rs2);