提交 02b33596 编写于 作者: E Edgar E. Iglesias

microblaze: Trap if QEMU finds an unknown insns.

If PVR settings enable illegal insn trap, trap when QEMU finds an
insn it knows nothing about.
Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@gmail.com>
上级 a12f6507
......@@ -1144,6 +1144,12 @@ static void dec_fpu(DisasContext *dc)
static void dec_null(DisasContext *dc)
{
if ((dc->tb_flags & MSR_EE_FLAG)
&& (dc->env->pvr.regs[2] & PVR2_ILL_OPCODE_EXC_MASK)) {
tcg_gen_movi_tl(cpu_SR[SR_ESR], ESR_EC_ILLEGAL_OP);
t_gen_raise_exception(dc, EXCP_HW_EXCP);
return;
}
qemu_log ("unknown insn pc=%x opc=%x\n", dc->pc, dc->opcode);
dc->abort_at_next_insn = 1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册