@@ -110,21 +110,6 @@ bool trigger_t::textra_match(processor_t * const proc) const noexcept
110
110
return true ;
111
111
}
112
112
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
-
128
113
reg_t disabled_trigger_t::tdata1_read (const processor_t * const proc) const noexcept
129
114
{
130
115
auto xlen = proc->get_xlen ();
@@ -235,7 +220,7 @@ std::optional<match_result_t> mcontrol_common_t::detect_memory_access_match(proc
235
220
value &= 0xffffffff ;
236
221
}
237
222
238
- if (simple_match (xlen, value) && allow_action (proc-> get_state ()) ) {
223
+ if (simple_match (xlen, value)) {
239
224
/* This is OK because this function is only called if the trigger was not
240
225
* inhibited by the previous trigger in the chain. */
241
226
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
316
301
317
302
std::optional<match_result_t > icount_t::detect_icount_fire (processor_t * const proc) noexcept
318
303
{
319
- if (!common_match (proc) || ! allow_action (proc-> get_state ()) )
304
+ if (!common_match (proc))
320
305
return std::nullopt;
321
306
322
307
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
331
316
332
317
void icount_t::detect_icount_decrement (processor_t * const proc) noexcept
333
318
{
334
- if (!common_match (proc) || ! allow_action (proc-> get_state ()) )
319
+ if (!common_match (proc))
335
320
return ;
336
321
337
322
if (count >= 1 ) {
@@ -423,7 +408,7 @@ std::optional<match_result_t> trap_common_t::detect_trap_match(processor_t * con
423
408
bool interrupt = (t.cause () & ((reg_t )1 << (xlen - 1 ))) != 0 ;
424
409
reg_t bit = t.cause () & ~((reg_t )1 << (xlen - 1 ));
425
410
assert (bit < xlen);
426
- if (simple_match (interrupt, bit) && allow_action (proc-> get_state ()) ) {
411
+ if (simple_match (interrupt, bit)) {
427
412
hit = true ;
428
413
return match_result_t (TIMING_AFTER, action);
429
414
}
0 commit comments