qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 07/18] target/i386: introduce flags writeback mechanism


From: Paolo Bonzini
Subject: Re: [PATCH 07/18] target/i386: introduce flags writeback mechanism
Date: Sun, 15 Oct 2023 16:51:26 +0200



On Sat, Oct 14, 2023 at 6:06 PM Richard Henderson <richard.henderson@linaro.org> wrote:
>
> On 10/14/23 03:01, Paolo Bonzini wrote:
> > +static void prepare_update1_cc(X86DecodedInsn *decode, DisasContext *s, CCOp op)
> > +{
> > +    decode->cc_dst = s->T0;
> > +    set_cc_op(s, op);
> > +}
>
> You must delay the set_cc_op() until the end too, for the same reason.  The function call
> will emit discard opcodes, which will kill cc_foo while still live via the memory exception.

Right, that can affect previous instructions due to dead code elimination.
I even wrote part of that code. :)

Since I have to add decode->cc_op, I'll add CC_OP_DYNAMIC handling as well, and
assert that everything is NULL if the gen_* function didn't touch decode->cc_op.

Thanks!

Paolo

>
>
> r~
>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]