Skip to content

Commit a7ea94c

Browse files
committed
adds functionality of 7f80906 to other priv wrappers
1 parent b800f51 commit a7ea94c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/iss/arch/riscv_hart_msu_vp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ template <typename BASE, features_e FEAT> void riscv_hart_msu_vp<BASE, FEAT>::ch
488488
bool mie = this->state.mstatus.MIE;
489489
auto m_enabled = this->reg.PRIV < PRIV_M || (this->reg.PRIV == PRIV_M && mie);
490490
auto enabled_interrupts = m_enabled ? ena_irq & ~ideleg : 0;
491-
491+
this->reg.pending_trap = 0;
492492
if(enabled_interrupts == 0) {
493493
auto sie = this->state.mstatus.SIE;
494494
auto s_enabled = this->reg.PRIV < PRIV_S || (this->reg.PRIV == PRIV_S && sie);

src/iss/arch/riscv_hart_mu_p.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ template <typename BASE, features_e FEAT> void riscv_hart_mu_p<BASE, FEAT>::chec
401401
bool mstatus_mie = this->state.mstatus.MIE;
402402
auto m_enabled = this->reg.PRIV < PRIV_M || mstatus_mie;
403403
auto enabled_interrupts = m_enabled ? ena_irq : 0;
404-
404+
this->reg.pending_trap = 0;
405405
if(enabled_interrupts != 0) {
406406
int res = 0;
407407
while((enabled_interrupts & 1) == 0) {

0 commit comments

Comments
 (0)