From 9dc01a04044b5f882bb15567818fa2a51af68691 Mon Sep 17 00:00:00 2001 From: Aleksa Vuckovic Date: Sun, 13 Apr 2025 15:22:11 +0200 Subject: Initial commit --- src/rv32i/slti.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/rv32i/slti.rs (limited to 'src/rv32i/slti.rs') diff --git a/src/rv32i/slti.rs b/src/rv32i/slti.rs new file mode 100644 index 0000000..09d166c --- /dev/null +++ b/src/rv32i/slti.rs @@ -0,0 +1,18 @@ +use crate::rv32_cpu::rv32_cpu::State; +use crate::instruction::instruction::{Instruction, Opcode}; + +#[derive(Debug)] +pub struct Slti; + +impl Instruction for Slti { + fn opcode(&self) -> Opcode { + Opcode { + opcode6_2: 0b00100, + opcode14_12: Some(0b001), + opcode31_27: Some(0b00000), + } + } + fn execute(&self, instruction: u32, state: &mut State) -> Result<(), Box> { + Ok(()) + } +} -- cgit v1.2.3