qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 19/26] target-xtensa: implement loop option


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 19/26] target-xtensa: implement loop option
Date: Fri, 20 May 2011 07:14:31 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Thunderbird/3.1.10

On 05/20/2011 02:10 AM, Max Filippov wrote:
>>> If you're going to pretend that LEND is a constant, you might as well
>>> pretend that LBEG is also a constant, so that you get to chain the TB's
>>> around the loop.
>>
>> But there may be three exits from TB at the LEND if its last
>> command is a branch: to the LBEG, to the branch target and to the
>> next insn.
> 
> Ok, I guess that I need to add gen_wsr_lbeg that invalidates TB at the
> current LEND, pretend that LBEG is constant and use given slot to jump
> to it. And also to get rid of tcg_gen_brcondi_i32(TCG_COND_NE,
> cpu_SR[LEND], dc->next_pc, label);

Yes.

Consider that the code is written to assume that the loop cycles,
so the most likely exit at LEND is LBEG.  If we choose to mirror
that logic inside TCG, then of the 3 possible exits from the block
one of them should be LBEG so that the most likely edge can get
chained.


r~



reply via email to

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