From 2720022e11323ca7e04153016469c9bcb5b6b61e Mon Sep 17 00:00:00 2001 From: Benjamin Kyd Date: Fri, 23 Jun 2023 01:08:27 +0100 Subject: [PATCH] edit idk what but i changed something --- src/ext/decode.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/ext/decode.rs b/src/ext/decode.rs index 2112b65..c71e661 100644 --- a/src/ext/decode.rs +++ b/src/ext/decode.rs @@ -75,10 +75,9 @@ pub union GenInstruction { trait Instruction { fn register(&self, ext: &mut Extension) where Self: Sized { - // ext.register(Box::new(self)); } - fn decode(&self); fn match_inst(&self, inst: rv32::Word) -> bool; + fn decode(&self); fn step(&self, inst: rv32::Word, state: &mut cpu::CPU); } @@ -90,14 +89,14 @@ impl ADDI { } } impl Instruction for ADDI { - fn decode(&self) { - - } - fn match_inst(&self, inst: rv32::Word) -> bool { match_mask!(inst, "xxxxxxxxxxxxxxxxxx000xxxx0010011") } + fn decode(&self) { + + } + fn step(&self, inst: rv32::Word, state: &mut cpu::CPU) { } }