rrs_lib

Trait InstructionProcessor

Source
pub trait InstructionProcessor {
    type InstructionResult;

Show 46 methods // Required methods fn process_add(&mut self, dec_insn: RType) -> Self::InstructionResult; fn process_sub(&mut self, dec_insn: RType) -> Self::InstructionResult; fn process_sll(&mut self, dec_insn: RType) -> Self::InstructionResult; fn process_slt(&mut self, dec_insn: RType) -> Self::InstructionResult; fn process_sltu(&mut self, dec_insn: RType) -> Self::InstructionResult; fn process_xor(&mut self, dec_insn: RType) -> Self::InstructionResult; fn process_srl(&mut self, dec_insn: RType) -> Self::InstructionResult; fn process_sra(&mut self, dec_insn: RType) -> Self::InstructionResult; fn process_or(&mut self, dec_insn: RType) -> Self::InstructionResult; fn process_and(&mut self, dec_insn: RType) -> Self::InstructionResult; fn process_addi(&mut self, dec_insn: IType) -> Self::InstructionResult; fn process_slli(&mut self, dec_insn: ITypeShamt) -> Self::InstructionResult; fn process_slti(&mut self, dec_insn: IType) -> Self::InstructionResult; fn process_sltui(&mut self, dec_insn: IType) -> Self::InstructionResult; fn process_xori(&mut self, dec_insn: IType) -> Self::InstructionResult; fn process_srli(&mut self, dec_insn: ITypeShamt) -> Self::InstructionResult; fn process_srai(&mut self, dec_insn: ITypeShamt) -> Self::InstructionResult; fn process_ori(&mut self, dec_insn: IType) -> Self::InstructionResult; fn process_andi(&mut self, dec_insn: IType) -> Self::InstructionResult; fn process_lui(&mut self, dec_insn: UType) -> Self::InstructionResult; fn process_auipc(&mut self, dec_insn: UType) -> Self::InstructionResult; fn process_beq(&mut self, dec_insn: BType) -> Self::InstructionResult; fn process_bne(&mut self, dec_insn: BType) -> Self::InstructionResult; fn process_blt(&mut self, dec_insn: BType) -> Self::InstructionResult; fn process_bltu(&mut self, dec_insn: BType) -> Self::InstructionResult; fn process_bge(&mut self, dec_insn: BType) -> Self::InstructionResult; fn process_bgeu(&mut self, dec_insn: BType) -> Self::InstructionResult; fn process_lb(&mut self, dec_insn: IType) -> Self::InstructionResult; fn process_lbu(&mut self, dec_insn: IType) -> Self::InstructionResult; fn process_lh(&mut self, dec_insn: IType) -> Self::InstructionResult; fn process_lhu(&mut self, dec_insn: IType) -> Self::InstructionResult; fn process_lw(&mut self, dec_insn: IType) -> Self::InstructionResult; fn process_sb(&mut self, dec_insn: SType) -> Self::InstructionResult; fn process_sh(&mut self, dec_insn: SType) -> Self::InstructionResult; fn process_sw(&mut self, dec_insn: SType) -> Self::InstructionResult; fn process_jal(&mut self, dec_insn: JType) -> Self::InstructionResult; fn process_jalr(&mut self, dec_insn: IType) -> Self::InstructionResult; fn process_mul(&mut self, dec_insn: RType) -> Self::InstructionResult; fn process_mulh(&mut self, dec_insn: RType) -> Self::InstructionResult; fn process_mulhu(&mut self, dec_insn: RType) -> Self::InstructionResult; fn process_mulhsu(&mut self, dec_insn: RType) -> Self::InstructionResult; fn process_div(&mut self, dec_insn: RType) -> Self::InstructionResult; fn process_divu(&mut self, dec_insn: RType) -> Self::InstructionResult; fn process_rem(&mut self, dec_insn: RType) -> Self::InstructionResult; fn process_remu(&mut self, dec_insn: RType) -> Self::InstructionResult; fn process_fence(&mut self, dec_insn: IType) -> Self::InstructionResult;
}
Expand description

A trait for objects which do something with RISC-V instructions (e.g. execute them or print a disassembly string).

There is one function per RISC-V instruction. Each function takes the appropriate struct from instruction_formats giving access to the decoded fields of the instruction. All functions return the InstructionProcessor::InstructionResult associated type.

Required Associated Types§

Required Methods§

Source

fn process_add(&mut self, dec_insn: RType) -> Self::InstructionResult

Source

fn process_sub(&mut self, dec_insn: RType) -> Self::InstructionResult

Source

fn process_sll(&mut self, dec_insn: RType) -> Self::InstructionResult

Source

fn process_slt(&mut self, dec_insn: RType) -> Self::InstructionResult

Source

fn process_sltu(&mut self, dec_insn: RType) -> Self::InstructionResult

Source

fn process_xor(&mut self, dec_insn: RType) -> Self::InstructionResult

Source

fn process_srl(&mut self, dec_insn: RType) -> Self::InstructionResult

Source

fn process_sra(&mut self, dec_insn: RType) -> Self::InstructionResult

Source

fn process_or(&mut self, dec_insn: RType) -> Self::InstructionResult

Source

fn process_and(&mut self, dec_insn: RType) -> Self::InstructionResult

Source

fn process_addi(&mut self, dec_insn: IType) -> Self::InstructionResult

Source

fn process_slli(&mut self, dec_insn: ITypeShamt) -> Self::InstructionResult

Source

fn process_slti(&mut self, dec_insn: IType) -> Self::InstructionResult

Source

fn process_sltui(&mut self, dec_insn: IType) -> Self::InstructionResult

Source

fn process_xori(&mut self, dec_insn: IType) -> Self::InstructionResult

Source

fn process_srli(&mut self, dec_insn: ITypeShamt) -> Self::InstructionResult

Source

fn process_srai(&mut self, dec_insn: ITypeShamt) -> Self::InstructionResult

Source

fn process_ori(&mut self, dec_insn: IType) -> Self::InstructionResult

Source

fn process_andi(&mut self, dec_insn: IType) -> Self::InstructionResult

Source

fn process_lui(&mut self, dec_insn: UType) -> Self::InstructionResult

Source

fn process_auipc(&mut self, dec_insn: UType) -> Self::InstructionResult

Source

fn process_beq(&mut self, dec_insn: BType) -> Self::InstructionResult

Source

fn process_bne(&mut self, dec_insn: BType) -> Self::InstructionResult

Source

fn process_blt(&mut self, dec_insn: BType) -> Self::InstructionResult

Source

fn process_bltu(&mut self, dec_insn: BType) -> Self::InstructionResult

Source

fn process_bge(&mut self, dec_insn: BType) -> Self::InstructionResult

Source

fn process_bgeu(&mut self, dec_insn: BType) -> Self::InstructionResult

Source

fn process_lb(&mut self, dec_insn: IType) -> Self::InstructionResult

Source

fn process_lbu(&mut self, dec_insn: IType) -> Self::InstructionResult

Source

fn process_lh(&mut self, dec_insn: IType) -> Self::InstructionResult

Source

fn process_lhu(&mut self, dec_insn: IType) -> Self::InstructionResult

Source

fn process_lw(&mut self, dec_insn: IType) -> Self::InstructionResult

Source

fn process_sb(&mut self, dec_insn: SType) -> Self::InstructionResult

Source

fn process_sh(&mut self, dec_insn: SType) -> Self::InstructionResult

Source

fn process_sw(&mut self, dec_insn: SType) -> Self::InstructionResult

Source

fn process_jal(&mut self, dec_insn: JType) -> Self::InstructionResult

Source

fn process_jalr(&mut self, dec_insn: IType) -> Self::InstructionResult

Source

fn process_mul(&mut self, dec_insn: RType) -> Self::InstructionResult

Source

fn process_mulh(&mut self, dec_insn: RType) -> Self::InstructionResult

Source

fn process_mulhu(&mut self, dec_insn: RType) -> Self::InstructionResult

Source

fn process_mulhsu(&mut self, dec_insn: RType) -> Self::InstructionResult

Source

fn process_div(&mut self, dec_insn: RType) -> Self::InstructionResult

Source

fn process_divu(&mut self, dec_insn: RType) -> Self::InstructionResult

Source

fn process_rem(&mut self, dec_insn: RType) -> Self::InstructionResult

Source

fn process_remu(&mut self, dec_insn: RType) -> Self::InstructionResult

Source

fn process_fence(&mut self, dec_insn: IType) -> Self::InstructionResult

Implementors§