From 5c008bfc0446e4631dbab64be61159af04f78dd1 Mon Sep 17 00:00:00 2001 From: taitep Date: Sat, 27 Dec 2025 21:33:39 +0100 Subject: Add exception values (what will go in mtval/stval) --- src/instructions/macros.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/instructions/macros.rs') diff --git a/src/instructions/macros.rs b/src/instructions/macros.rs index 98cf63d..c8fa8f1 100644 --- a/src/instructions/macros.rs +++ b/src/instructions/macros.rs @@ -7,7 +7,7 @@ #[macro_export] macro_rules! instr_branch { ($name:ident, $cond:expr) => { - pub fn $name(core: &mut Core, instr: Instruction) -> Result<(), ExceptionType> { + pub fn $name(core: &mut Core, instr: Instruction) -> Result<(), Exception> { let a = core.reg_read(instr.rs1()); let b = core.reg_read(instr.rs2()); if $cond(a, b) { @@ -30,7 +30,7 @@ macro_rules! instr_branch_signed { #[macro_export] macro_rules! instr_op_r { ($name:ident, $op:expr) => { - pub fn $name(core: &mut Core, instr: Instruction) -> Result<(), ExceptionType> { + pub fn $name(core: &mut Core, instr: Instruction) -> Result<(), Exception> { let a = core.reg_read(instr.rs1()); let b = core.reg_read(instr.rs2()); let res = $op(a, b); @@ -44,7 +44,7 @@ macro_rules! instr_op_r { #[macro_export] macro_rules! instr_op_i { ($name:ident, $op:expr) => { - pub fn $name(core: &mut Core, instr: Instruction) -> Result<(), ExceptionType> { + pub fn $name(core: &mut Core, instr: Instruction) -> Result<(), Exception> { let a = core.reg_read(instr.rs1()); let b = instr.imm_i(); let res = $op(a, b); -- cgit v1.2.3