4 extension_t::~extension_t()
8 void extension_t::illegal_instruction()
10 throw trap_illegal_instruction();
13 void extension_t::raise_interrupt()
15 int priv
= get_field(p
->get_state()->mstatus
, MSTATUS_PRV
);
16 int ie
= get_field(p
->get_state()->mstatus
, MSTATUS_IE
);
18 if (priv
< PRV_M
|| (priv
== PRV_M
&& ie
)) {
19 p
->raise_interrupt(IRQ_COP
);
22 throw std::logic_error("a COP exception was posted, but interrupts are disabled!");
25 void extension_t::clear_interrupt()