summaryrefslogtreecommitdiff
path: root/src/instructions.rs
diff options
context:
space:
mode:
authortaitep <taitep@taitep.se>2025-12-21 15:56:50 +0100
committertaitep <taitep@taitep.se>2025-12-21 15:56:50 +0100
commit390a2b322828c10e135022822984826cf108bade (patch)
tree0afe43bba9d53441353aff0b1e9838656789ce7a /src/instructions.rs
parent25ecfca912d9451d567827aceafe405b68b2d256 (diff)
Implement LB and LBU
Diffstat (limited to 'src/instructions.rs')
-rw-r--r--src/instructions.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/instructions.rs b/src/instructions.rs
index 5261dde..935a51f 100644
--- a/src/instructions.rs
+++ b/src/instructions.rs
@@ -34,6 +34,12 @@ pub(crate) fn find_and_exec(instr: Instruction, core: &mut Core) -> Option<Instr
0b011 => Some(rvi::sd(core, instr)),
_ => None,
},
+ 0b00000 => match instr.funct3() {
+ // LOAD
+ 0b000 => Some(rvi::lb(core, instr)),
+ 0b100 => Some(rvi::lbu(core, instr)),
+ _ => None,
+ },
0b01101 => Some(rvi::lui(core, instr)),
0b11011 => Some(rvi::jal(core, instr)),
_ => None,