aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/c_ebreak.h
blob: 14b5136310ea5132c95d648cbf74d187a31c6779 (plain)
1
2
3
4
5
6
7
8
9
require_extension(EXT_ZCA);
if (!STATE.debug_mode &&
    ((STATE.prv == PRV_M && STATE.dcsr->ebreakm) ||
     (STATE.prv == PRV_S && STATE.dcsr->ebreaks) ||
     (STATE.prv == PRV_U && STATE.dcsr->ebreaku))) {
	throw trap_debug_mode();
} else {
	throw trap_breakpoint(STATE.v, pc);
}