提交 7472e2ef 编写于 作者: P Peter Maydell

target/arm: Generate UNDEF for 32-bit Thumb2 insns

The refactoring of commit 296e5a0a has a nasty bug:
it accidentally dropped the generation of code to raise
the UNDEF exception when disas_thumb2_insn() returns nonzero.
This means that 32-bit Thumb2 instruction patterns that
ought to UNDEF just act like nops instead. This is likely
to break any number of things, including the kernel's "disable
the FPU and use the UNDEF exception to identify when to turn
it back on again" trick.
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
Message-id: 1513006964-3371-1-git-send-email-peter.maydell@linaro.org
Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
上级 2babfe0c
......@@ -12245,7 +12245,10 @@ static void thumb_tr_translate_insn(DisasContextBase *dcbase, CPUState *cpu)
if (is_16bit) {
disas_thumb_insn(dc, insn);
} else {
disas_thumb2_insn(dc, insn);
if (disas_thumb2_insn(dc, insn)) {
gen_exception_insn(dc, 4, EXCP_UDEF, syn_uncategorized(),
default_exception_el(dc));
}
}
/* Advance the Thumb condexec condition. */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册