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
>> > + 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);
>>
> > +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);
> > +
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
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