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/exceptions.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/exceptions.rs') diff --git a/src/exceptions.rs b/src/exceptions.rs index 5e3f02f..6bc21f2 100644 --- a/src/exceptions.rs +++ b/src/exceptions.rs @@ -31,6 +31,15 @@ pub enum ExceptionType { HardwareError = 19, } +impl ExceptionType { + pub fn with_no_value(self) -> Exception { + Exception { + type_: self, + value: 0, + } + } +} + #[derive(Debug, Clone, Copy)] pub struct Exception { pub type_: ExceptionType, -- cgit v1.2.3