summaryrefslogtreecommitdiff
path: root/src/rv32i/slti.rs
blob: 09d166c0cbedfe782bda00b6d9f6a18049340383 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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<dyn std::error::Error>> {
        Ok(())
    }
}