Re: [Qemu-devel] [PATCH v2] target/xtensa: rework zero overhead loops implementation

2019-01-11 Thread Richard Henderson
On 1/12/19 9:27 AM, Max Filippov wrote: > Maybe "Any other value means that an instruction that ends at this offset > from the page start may loop back and will need loopback code to be > generated"? Much better, thanks. r~

Re: [Qemu-devel] [PATCH v2] target/xtensa: rework zero overhead loops implementation

2019-01-11 Thread Max Filippov
On Fri, Jan 11, 2019 at 2:23 PM Max Filippov wrote: > > On Fri, Jan 11, 2019 at 2:17 PM Richard Henderson > wrote: > > > > On 1/12/19 9:14 AM, Max Filippov wrote: > > >>> +/* > > >>> + * 0 in the csbase_lend field means that there may not be a > > >>> loopback > > >>> + *

Re: [Qemu-devel] [PATCH v2] target/xtensa: rework zero overhead loops implementation

2019-01-11 Thread Max Filippov
On Fri, Jan 11, 2019 at 2:17 PM Richard Henderson wrote: > > On 1/12/19 9:14 AM, Max Filippov wrote: > >>> +/* > >>> + * 0 in the csbase_lend field means that there may not be a > >>> loopback > >>> + * for any instruction that starts inside this page. Any other > >>> val

Re: [Qemu-devel] [PATCH v2] target/xtensa: rework zero overhead loops implementation

2019-01-11 Thread Richard Henderson
On 1/12/19 9:14 AM, Max Filippov wrote: >>> +/* >>> + * 0 in the csbase_lend field means that there may not be a >>> loopback >>> + * for any instruction that starts inside this page. Any other >>> value >>> + * means that an instruction that ends at this offset fr

Re: [Qemu-devel] [PATCH v2] target/xtensa: rework zero overhead loops implementation

2019-01-11 Thread Max Filippov
On Fri, Jan 11, 2019 at 2:09 PM Richard Henderson wrote: > > On 1/12/19 9:01 AM, Max Filippov wrote: > > Don't invalidate TB with the end of zero overhead loop when LBEG or LEND > > change. Instead encode the distance from the start of the page where the > > TB starts to the LEND in the TB cs_base

Re: [Qemu-devel] [PATCH v2] target/xtensa: rework zero overhead loops implementation

2019-01-11 Thread Richard Henderson
On 1/12/19 9:01 AM, Max Filippov wrote: > Don't invalidate TB with the end of zero overhead loop when LBEG or LEND > change. Instead encode the distance from the start of the page where the > TB starts to the LEND in the TB cs_base and generate loopback code when > the next PC matches encoded LEND.

[Qemu-devel] [PATCH v2] target/xtensa: rework zero overhead loops implementation

2019-01-11 Thread Max Filippov
Don't invalidate TB with the end of zero overhead loop when LBEG or LEND change. Instead encode the distance from the start of the page where the TB starts to the LEND in the TB cs_base and generate loopback code when the next PC matches encoded LEND. Distance to a destination within the same page