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

2011-05-20 Thread Richard Henderson
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 b

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

2011-05-20 Thread Max Filippov
>> > +    if (env->sregs[LEND] != v) { >> > +        tb_invalidate_phys_page_range( >> > +                env->sregs[LEND] - 1, env->sregs[LEND], 0); >> > +        env->sregs[LEND] = v; >> > +        tb_invalidate_phys_page_range( >> > +                env->sregs[LEND] - 1, env->sregs[LEND], 0); >>

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

2011-05-20 Thread Max Filippov
> > +if (env->sregs[LEND] != v) { > > +tb_invalidate_phys_page_range( > > +env->sregs[LEND] - 1, env->sregs[LEND], 0); > > +env->sregs[LEND] = v; > > +tb_invalidate_phys_page_range( > > +env->sregs[LEND] - 1, env->sregs[LEND], 0); > > +

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

2011-05-19 Thread Richard Henderson
On 05/17/2011 03:32 PM, Max Filippov wrote: > +if (env->sregs[LEND] != v) { > +tb_invalidate_phys_page_range( > +env->sregs[LEND] - 1, env->sregs[LEND], 0); > +env->sregs[LEND] = v; > +tb_invalidate_phys_page_range( > +env->sregs[LEND] - 1

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

2011-05-17 Thread Max Filippov
See ISA, 4.3.2 for details. Operations that change LEND SR value invalidate TBs at the old and at the new LEND. LEND value at TB compilation time is considered constant and loop instruction is generated based on this value. Invalidation may be avoided for the TB at the old LEND address, since loo