qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC] target/xtensa: rework zero overhead loops impleme


From: Max Filippov
Subject: Re: [Qemu-devel] [RFC] target/xtensa: rework zero overhead loops implementation
Date: Thu, 4 Oct 2018 13:14:45 -0700

On Wed, Oct 3, 2018 at 6:05 PM Max Filippov <address@hidden> wrote:
>
> Don't invalidate TB with the end of zero overhead loop when LBEG or LEND
> change. Instead encode the distance from the TB start to the LEND in the
> TB flags and generate loopback code when offset of the next PC from the
> TB start equals that distance. Distance not greater than the maximal
> instruction length is encoded literally, greater distances are capped at
> the target page size and encoded as the maximal instruction length plus
> the greatest power of 2 that is not bigger than the distance.
>
> Although this change adds dynamic TB search at the end of each zero
> overhead loop the resulting emulation speed is about 10% higher in
> uClibc-ng and LTP tests.

I thought about it some more and it looks like this is not going to work
in general case in the presence of TB linking: a block with a big (and thus
not precise) LEND distance may be linked to a block with a small (and
thus precise) LEND distance. Then LEND may change so that next time
it still goes to the first TB. In that case it shouldn't go from the first TB
to the second, but with this scheme it will.

-- 
Thanks.
-- Max



reply via email to

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