diff options
Diffstat (limited to 'model/riscv_insts_base.sail')
-rw-r--r-- | model/riscv_insts_base.sail | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/model/riscv_insts_base.sail b/model/riscv_insts_base.sail index e2ad961..7ec2756 100644 --- a/model/riscv_insts_base.sail +++ b/model/riscv_insts_base.sail @@ -717,11 +717,10 @@ mapping clause encdec = MRET() function clause execute MRET() = { if cur_privilege != Machine - then handle_illegal() + then { handle_illegal(); RETIRE_FAIL } else if ~(ext_check_xret_priv (Machine)) - then ext_fail_xret_priv () - else set_next_pc(exception_handler(cur_privilege, CTL_MRET(), PC)); - RETIRE_FAIL + then { ext_fail_xret_priv(); RETIRE_FAIL } + else { set_next_pc(exception_handler(cur_privilege, CTL_MRET(), PC)); RETIRE_SUCCESS } } mapping clause assembly = MRET() <-> "mret" @@ -739,11 +738,10 @@ function clause execute SRET() = { Machine => ~ (haveSupMode ()) }; if sret_illegal - then handle_illegal() + then { handle_illegal(); RETIRE_FAIL } else if ~(ext_check_xret_priv (Supervisor)) - then ext_fail_xret_priv () - else set_next_pc(exception_handler(cur_privilege, CTL_SRET(), PC)); - RETIRE_FAIL + then { ext_fail_xret_priv(); RETIRE_FAIL } + else { set_next_pc(exception_handler(cur_privilege, CTL_SRET(), PC)); RETIRE_SUCCESS } } mapping clause assembly = SRET() <-> "sret" |