[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v11 23/29] target/arm: [tcg] Port to translate_i
Re: [Qemu-devel] [PATCH v11 23/29] target/arm: [tcg] Port to translate_insn
Fri, 7 Jul 2017 18:33:00 +0100
On 7 July 2017 at 16:26, Richard Henderson <address@hidden> wrote:
> That is the purpose of DISAS_EXC too. We've called a noreturn helper to
> raise an exception and all following code is unreached. If there *was* any
> code being emitted afterward, that is arguably a bug.
One exception to that is a conditionally executed
exception generating exception -- there will in that
case be a following label for the condfail case to branch
to and the code for the condfail path.
The distinction in the case that this code fragment is touching
is that the cases handled in current master via 'goto
done_generating' and in Lluis' patch as
DISAS_SKIP are the "this insn is going to generate an
exception without even thinking about conditional
exception" (ie breakpoints, singlestep); DISAS_EXC
is for "the instruction itself generates an exception,
so don't bother with emitting too much unreachable
code to update the PC etc, but we still need to handle
the usual end-of-insn condfail path".
We do a few things in the DISAS_EXC codepath
(like calling gen_set_condexec()) which strictly speaking
are pointless but which it didn't seem worth trying to
avoid just to avoid generating a few extra bytes in the
generated code in a not-terribly-likely case.