diff options
author | Robert Norton <rmn30@cam.ac.uk> | 2019-07-01 12:09:02 +0100 |
---|---|---|
committer | Robert Norton <rmn30@cam.ac.uk> | 2019-07-01 12:09:02 +0100 |
commit | b3a9c7972d7c75b0e133f11def12c3c9f1a090f9 (patch) | |
tree | a6fe631a62c8cb19b364fd8779c8ff6154e280c1 /model/riscv_sys_control.sail | |
parent | efdbcdb53c9f11cf259443c5768fff168cfe50a0 (diff) | |
parent | 0fbfc08351dfdc2f57c57f78632ce9bef64d109a (diff) | |
download | sail-riscv-b3a9c7972d7c75b0e133f11def12c3c9f1a090f9.zip sail-riscv-b3a9c7972d7c75b0e133f11def12c3c9f1a090f9.tar.gz sail-riscv-b3a9c7972d7c75b0e133f11def12c3c9f1a090f9.tar.bz2 |
Merge remote-tracking branch 'origin/master' into master-cleanup
Diffstat (limited to 'model/riscv_sys_control.sail')
-rw-r--r-- | model/riscv_sys_control.sail | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/model/riscv_sys_control.sail b/model/riscv_sys_control.sail index ed0a8de..e852496 100644 --- a/model/riscv_sys_control.sail +++ b/model/riscv_sys_control.sail @@ -296,7 +296,8 @@ function trap_handler(del_priv : Privilege, intr : bool, c : exc_code, pc : xlen -> xlenbits = { rvfi_trap(); print_platform("handling " ^ (if intr then "int#" else "exc#") - ^ BitStr(c) ^ " at priv " ^ del_priv ^ " with tval " ^ BitStr(tval(info))); + ^ BitStr(c) ^ " at priv " ^ to_str(del_priv) + ^ " with tval " ^ BitStr(tval(info))); cancel_reservation(); @@ -370,8 +371,8 @@ function exception_handler(cur_priv : Privilege, ctl : ctl_result, match (cur_priv, ctl) { (_, CTL_TRAP(e)) => { let del_priv = exception_delegatee(e.trap, cur_priv); - print_platform("trapping from " ^ cur_priv ^ " to " ^ del_priv - ^ " to handle " ^ e.trap); + print_platform("trapping from " ^ to_str(cur_priv) ^ " to " ^ to_str(del_priv) + ^ " to handle " ^ to_str(e.trap)); trap_handler(del_priv, false, e.trap, pc, e.excinfo, e.ext) }, (_, CTL_MRET()) => { @@ -382,7 +383,7 @@ function exception_handler(cur_priv : Privilege, ctl : ctl_result, mstatus->MPP() = privLevel_to_bits(if haveUsrMode() then User else Machine); print_reg("CSR mstatus <- " ^ BitStr(mstatus.bits())); - print_platform("ret-ing from " ^ prev_priv ^ " to " ^ cur_privilege); + print_platform("ret-ing from " ^ to_str(prev_priv) ^ " to " ^ to_str(cur_privilege)); cancel_reservation(); prepare_xret_target(Machine) & pc_alignment_mask() @@ -396,7 +397,8 @@ function exception_handler(cur_priv : Privilege, ctl : ctl_result, mstatus->SPP() = false; print_reg("CSR mstatus <- " ^ BitStr(mstatus.bits())); - print_platform("ret-ing from " ^ prev_priv ^ " to " ^ cur_privilege); + print_platform("ret-ing from " ^ to_str(prev_priv) + ^ " to " ^ to_str(cur_privilege)); cancel_reservation(); prepare_xret_target(Supervisor) & pc_alignment_mask() @@ -408,7 +410,7 @@ function exception_handler(cur_priv : Privilege, ctl : ctl_result, cur_privilege = User; print_reg("CSR mstatus <- " ^ BitStr(mstatus.bits())); - print_platform("ret-ing from " ^ prev_priv ^ " to " ^ cur_privilege); + print_platform("ret-ing from " ^ to_str(prev_priv) ^ " to " ^ to_str(cur_privilege)); cancel_reservation(); prepare_xret_target(User) & pc_alignment_mask() |