@@ -110,21 +110,6 @@ bool trigger_t::textra_match(processor_t * const proc) const noexcept
110110 return true ;
111111}
112112
113- bool trigger_t::allow_action (const state_t * const state) const
114- {
115- if (get_action () == ACTION_DEBUG_EXCEPTION) {
116- const bool mstatus_mie = state->mstatus ->read () & MSTATUS_MIE;
117- const bool sstatus_sie = state->sstatus ->read () & MSTATUS_SIE;
118- const bool vsstatus_sie = state->vsstatus ->read () & MSTATUS_SIE;
119- const bool medeleg_breakpoint = (state->medeleg ->read () >> CAUSE_BREAKPOINT) & 1 ;
120- const bool hedeleg_breakpoint = (state->hedeleg ->read () >> CAUSE_BREAKPOINT) & 1 ;
121- return (state->prv != PRV_M || mstatus_mie) &&
122- (state->prv != PRV_S || state->v || !medeleg_breakpoint || sstatus_sie) &&
123- (state->prv != PRV_S || !state->v || !medeleg_breakpoint || !hedeleg_breakpoint || vsstatus_sie);
124- }
125- return true ;
126- }
127-
128113reg_t disabled_trigger_t::tdata1_read (const processor_t * const proc) const noexcept
129114{
130115 auto xlen = proc->get_xlen ();
@@ -235,7 +220,7 @@ std::optional<match_result_t> mcontrol_common_t::detect_memory_access_match(proc
235220 value &= 0xffffffff ;
236221 }
237222
238- if (simple_match (xlen, value) && allow_action (proc-> get_state ()) ) {
223+ if (simple_match (xlen, value)) {
239224 /* This is OK because this function is only called if the trigger was not
240225 * inhibited by the previous trigger in the chain. */
241226 set_hit (timing ? HIT_IMMEDIATELY_AFTER : HIT_BEFORE);
@@ -316,7 +301,7 @@ void mcontrol6_t::tdata1_write(processor_t * const proc, const reg_t val, const
316301
317302std::optional<match_result_t > icount_t::detect_icount_fire (processor_t * const proc) noexcept
318303{
319- if (!common_match (proc) || ! allow_action (proc-> get_state ()) )
304+ if (!common_match (proc))
320305 return std::nullopt ;
321306
322307 std::optional<match_result_t > ret = std::nullopt ;
@@ -331,7 +316,7 @@ std::optional<match_result_t> icount_t::detect_icount_fire(processor_t * const p
331316
332317void icount_t::detect_icount_decrement (processor_t * const proc) noexcept
333318{
334- if (!common_match (proc) || ! allow_action (proc-> get_state ()) )
319+ if (!common_match (proc))
335320 return ;
336321
337322 if (count >= 1 ) {
@@ -423,7 +408,7 @@ std::optional<match_result_t> trap_common_t::detect_trap_match(processor_t * con
423408 bool interrupt = (t.cause () & ((reg_t )1 << (xlen - 1 ))) != 0 ;
424409 reg_t bit = t.cause () & ~((reg_t )1 << (xlen - 1 ));
425410 assert (bit < xlen);
426- if (simple_match (interrupt, bit) && allow_action (proc-> get_state ()) ) {
411+ if (simple_match (interrupt, bit)) {
427412 hit = true ;
428413 return match_result_t (TIMING_AFTER, action);
429414 }
0 commit comments