diff options
author | Prashanth Mundkur <prashanth.mundkur@gmail.com> | 2019-05-24 14:22:18 -0700 |
---|---|---|
committer | Prashanth Mundkur <prashanth.mundkur@gmail.com> | 2019-05-24 14:22:18 -0700 |
commit | 4799f996fc5b27f53a93a521db7ff2f54a5d3558 (patch) | |
tree | 50c08636282e19f57e7a6b7bd6c9616c9752f610 /model/riscv_sys_control.sail | |
parent | e49783404e8139b7a7bb2974af13b3d8a72da48d (diff) | |
download | sail-riscv-4799f996fc5b27f53a93a521db7ff2f54a5d3558.zip sail-riscv-4799f996fc5b27f53a93a521db7ff2f54a5d3558.tar.gz sail-riscv-4799f996fc5b27f53a93a521db7ff2f54a5d3558.tar.bz2 |
Make xret hooks differentiate between just reading xret target values and getting the value when transferring control to the xret target.
Diffstat (limited to 'model/riscv_sys_control.sail')
-rw-r--r-- | model/riscv_sys_control.sail | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/model/riscv_sys_control.sail b/model/riscv_sys_control.sail index 6bee610..e866986 100644 --- a/model/riscv_sys_control.sail +++ b/model/riscv_sys_control.sail @@ -366,7 +366,7 @@ function exception_handler(cur_priv : Privilege, ctl : ctl_result, print_platform("ret-ing from " ^ prev_priv ^ " to " ^ cur_privilege); cancel_reservation(); - get_xret_target(Machine) & pc_alignment_mask() + prepare_xret_target(Machine) & pc_alignment_mask() }, (_, CTL_SRET()) => { let prev_priv = cur_privilege; @@ -380,7 +380,7 @@ function exception_handler(cur_priv : Privilege, ctl : ctl_result, print_platform("ret-ing from " ^ prev_priv ^ " to " ^ cur_privilege); cancel_reservation(); - get_xret_target(Supervisor) & pc_alignment_mask() + prepare_xret_target(Supervisor) & pc_alignment_mask() }, (_, CTL_URET()) => { let prev_priv = cur_privilege; @@ -392,7 +392,7 @@ function exception_handler(cur_priv : Privilege, ctl : ctl_result, print_platform("ret-ing from " ^ prev_priv ^ " to " ^ cur_privilege); cancel_reservation(); - get_xret_target(User) & pc_alignment_mask() + prepare_xret_target(User) & pc_alignment_mask() } } } |