qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Shifts, ppc[64], xtensa


From: Richard Henderson
Subject: Re: [Qemu-devel] Shifts, ppc[64], xtensa
Date: Wed, 19 Sep 2012 10:00:38 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0

On 09/19/2012 05:57 AM, Peter Maydell wrote:
>> > -            s->code_ptr += 16;
>> > +            tcg_out32 (s, NOP);
>> > +            tcg_out32 (s, NOP);
>> > +            tcg_out32 (s, NOP);
>> > +            tcg_out32 (s, NOP);
> Not too familiar with the PPC backend, but doesn't this mean that
> in the retranslation case we will overwrite a correct jump destination
> with these NOP words and then rewrite it again with the correct
> destination? That can cause problems with cache incoherency;
> compare the fix applied in commit c69806ab8276 for ARM.

Well, i386 certainly doesn't care about re-translation here:

            /* direct jump method */
            tcg_out8(s, OPC_JMP_long); /* jmp im */
            s->tb_jmp_offset[args[0]] = s->code_ptr - s->code_buf;
            tcg_out32(s, 0);

That creates an explicit branch to next.

And as far as the referenced change, that has to do with "real"
branches, i.e. INDEX_op_brcond et at.  Which *do* need to be
protected against retranslation.  But INDEX_op_goto_tb is a
different case.


r~



reply via email to

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