diff options
| author | taitep <taitep@taitep.se> | 2025-12-27 21:33:39 +0100 |
|---|---|---|
| committer | taitep <taitep@taitep.se> | 2025-12-27 21:33:39 +0100 |
| commit | 5c008bfc0446e4631dbab64be61159af04f78dd1 (patch) | |
| tree | 852f7ee883f675b4c67cf424b8f7d17357e7742d /src/instructions/macros.rs | |
| parent | b5d36b7969f2759147d58a80e0e5b62c215d2998 (diff) | |
Add exception values (what will go in mtval/stval)
Diffstat (limited to 'src/instructions/macros.rs')
| -rw-r--r-- | src/instructions/macros.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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); |
