From 8024af6b1348b5f47fabe5a1949de54607a33888 Mon Sep 17 00:00:00 2001 From: taitep Date: Sat, 27 Dec 2025 21:47:22 +0100 Subject: Implement ECALL and EBREAK, the final RV64I instructions! --- src/decode.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/decode.rs') diff --git a/src/decode.rs b/src/decode.rs index d520151..e24bac0 100644 --- a/src/decode.rs +++ b/src/decode.rs @@ -93,4 +93,9 @@ impl Instruction { pub fn funct6(self) -> u8 { (self.0 >> 26 & 0x3f) as u8 } + + /// Mostly/only used for the SYSTEM opcode + pub fn funct12(self) -> u16 { + (self.0 >> 20) as u16 + } } -- cgit v1.2.3