diff options
| author | taitep <taitep@taitep.se> | 2025-12-21 16:29:28 +0100 |
|---|---|---|
| committer | taitep <taitep@taitep.se> | 2025-12-21 16:29:28 +0100 |
| commit | c05ba60c3c6ebe89a3db666c316929e0d0d2fdfa (patch) | |
| tree | 89f33937b3702e14eab06ade1f00b456df8a1144 /src/instructions.rs | |
| parent | acc267a460464c3dffa59a62f900965cfd342e61 (diff) | |
Implement ANDI and BEQ
Diffstat (limited to 'src/instructions.rs')
| -rw-r--r-- | src/instructions.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/instructions.rs b/src/instructions.rs index 935a51f..68b43a6 100644 --- a/src/instructions.rs +++ b/src/instructions.rs @@ -21,6 +21,7 @@ pub(crate) fn find_and_exec(instr: Instruction, core: &mut Core) -> Option<Instr 0b000000 => Some(rvi::slli(core, instr)), _ => None, }, + 0b111 => Some(rvi::andi(core, instr)), _ => None, }, 0b00110 => match instr.funct3() { @@ -40,6 +41,11 @@ pub(crate) fn find_and_exec(instr: Instruction, core: &mut Core) -> Option<Instr 0b100 => Some(rvi::lbu(core, instr)), _ => None, }, + 0b11000 => match instr.funct3() { + // BRANCH + 0b000 => Some(rvi::beq(core, instr)), + _ => None, + }, 0b01101 => Some(rvi::lui(core, instr)), 0b11011 => Some(rvi::jal(core, instr)), _ => None, |
