Re: [Qemu-devel] [PATCH 05/16] translate-all: iterate over TBs in a page with PAGE_FOR_EACH_TB

2018-02-28 Thread Richard Henderson
On 02/28/2018 02:50 PM, Emilio G. Cota wrote: > Is this any better? > > #define TB_FOR_EACH_TAGGED(head, tb, n, field) \ > for (n = (head) & 1, tb = (TranslationBlock *)((head) & ~1);\ > tb; tb = (TranslationBlock *)tb->field[n], n = (uintptr_t)tb &

Re: [Qemu-devel] [PATCH 05/16] translate-all: iterate over TBs in a page with PAGE_FOR_EACH_TB

2018-02-28 Thread Emilio G. Cota
On Wed, Feb 28, 2018 at 13:40:15 -0800, Richard Henderson wrote: > On 02/26/2018 09:39 PM, Emilio G. Cota wrote: > > +/* list iterators for lists of tagged pointers in TranslationBlock */ > > +#define TB_FOR_EACH_TAGGED(head, tb, n, field) \ > > +for (n = (head) & 1,

Re: [Qemu-devel] [PATCH 05/16] translate-all: iterate over TBs in a page with PAGE_FOR_EACH_TB

2018-02-28 Thread Richard Henderson
On 02/26/2018 09:39 PM, Emilio G. Cota wrote: > +/* list iterators for lists of tagged pointers in TranslationBlock */ > +#define TB_FOR_EACH_TAGGED(head, tb, n, field) \ > +for (n = (head) & 1,\ > + tb = (TranslationBlock

[Qemu-devel] [PATCH 05/16] translate-all: iterate over TBs in a page with PAGE_FOR_EACH_TB

2018-02-26 Thread Emilio G. Cota
This commit does several things, but to avoid churn I merged them all into the same commit. To wit: - Use uintptr_t instead of TranslationBlock * for the list of TBs in a page. Just like we did in (c37e6d7e "tcg: Use uintptr_t type for jmp_list_{next|first} fields of TB"), the rationale is