Implement ADD

This commit is contained in:
2025-12-22 19:19:19 +01:00
parent e00103375d
commit ff161a69e6
2 changed files with 15 additions and 0 deletions

View File

@@ -13,6 +13,11 @@ use crate::{
pub(crate) fn find_and_exec(instr: Instruction, core: &mut Core) -> Option<InstructionResult> {
match instr.opcode_noncompressed() {
0b01100 => match (instr.funct7(), instr.funct3()) {
// OP
(0b0000000, 0b000) => Some(rvi::add(core, instr)),
_ => None,
},
0b00100 => match instr.funct3() {
// OP_IMM
0b000 => Some(rvi::addi(core, instr)),