diff options
author | Andrew Waterman <andrew@sifive.com> | 2023-05-18 21:48:53 -0700 |
---|---|---|
committer | Andrew Waterman <andrew@sifive.com> | 2023-05-18 21:48:53 -0700 |
commit | 0e83fe66fbf7b918602476bbaacfa6198a90d337 (patch) | |
tree | 93a72f8e0f093f1c872a0cacb2d822c166954bc0 /riscv/insns | |
parent | 7a2ff14bff461f2c7adfbf407e11527f55d920db (diff) | |
download | riscv-isa-sim-rivosinc-etrigger_fix_exception_match.zip riscv-isa-sim-rivosinc-etrigger_fix_exception_match.tar.gz riscv-isa-sim-rivosinc-etrigger_fix_exception_match.tar.bz2 |
Call stash_privilege more selectivelyrivosinc-etrigger_fix_exception_match
Diffstat (limited to 'riscv/insns')
-rw-r--r-- | riscv/insns/dret.h | 1 | ||||
-rw-r--r-- | riscv/insns/mnret.h | 1 | ||||
-rw-r--r-- | riscv/insns/mret.h | 1 | ||||
-rw-r--r-- | riscv/insns/sret.h | 1 |
4 files changed, 4 insertions, 0 deletions
diff --git a/riscv/insns/dret.h b/riscv/insns/dret.h index 56ce25b..ffbe0ae 100644 --- a/riscv/insns/dret.h +++ b/riscv/insns/dret.h @@ -1,4 +1,5 @@ require(STATE.debug_mode); +p->stash_privilege(); set_pc_and_serialize(STATE.dpc->read()); p->set_privilege(STATE.dcsr->prv); if (STATE.prv < PRV_M) diff --git a/riscv/insns/mnret.h b/riscv/insns/mnret.h index bc69510..2888f8d 100644 --- a/riscv/insns/mnret.h +++ b/riscv/insns/mnret.h @@ -1,5 +1,6 @@ require_extension(EXT_SMRNMI); require_privilege(PRV_M); +p->stash_privilege(); set_pc_and_serialize(p->get_state()->mnepc->read()); reg_t s = STATE.mnstatus->read(); reg_t prev_prv = get_field(s, MNSTATUS_MNPP); diff --git a/riscv/insns/mret.h b/riscv/insns/mret.h index 5198b8f..6cb6a0d 100644 --- a/riscv/insns/mret.h +++ b/riscv/insns/mret.h @@ -1,4 +1,5 @@ require_privilege(PRV_M); +p->stash_privilege(); set_pc_and_serialize(p->get_state()->mepc->read()); reg_t s = STATE.mstatus->read(); reg_t prev_prv = get_field(s, MSTATUS_MPP); diff --git a/riscv/insns/sret.h b/riscv/insns/sret.h index 5102c15..17e583d 100644 --- a/riscv/insns/sret.h +++ b/riscv/insns/sret.h @@ -1,4 +1,5 @@ require_extension('S'); +p->stash_privilege(); reg_t prev_hstatus = STATE.hstatus->read(); if (STATE.v) { if (STATE.prv == PRV_U || get_field(prev_hstatus, HSTATUS_VTSR)) |