From: Yunsup Lee Date: Fri, 18 Oct 2013 02:44:53 +0000 (-0700) Subject: catch trap_illegal_instruction in hwacha X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1057bae0a0d272567189421d22ed6e190c5e30a6;p=riscv-isa-sim.git catch trap_illegal_instruction in hwacha --- diff --git a/hwacha/hwacha.cc b/hwacha/hwacha.cc index b1cf7fc..0d6b906 100644 --- a/hwacha/hwacha.cc +++ b/hwacha/hwacha.cc @@ -50,6 +50,10 @@ static reg_t custom(processor_t* p, insn_t insn, reg_t pc) { h->take_exception(HWACHA_CAUSE_VF_FAULT_FETCH, h->get_ct_state()->vf_pc); } + catch (trap_illegal_instruction& t) + { + h->take_exception(HWACHA_CAUSE_VF_ILLEGAL_INSTRUCTION, h->get_ct_state()->vf_pc); + } catch (trap_load_address_misaligned& t) { h->take_exception(HWACHA_CAUSE_MISALIGNED_LOAD, t.get_badvaddr());