Re: [PATCH v3 09/20] cputlb: Replace switches in load/store_helper with callback

2019-09-23 Thread Richard Henderson
On 9/23/19 8:52 AM, Richard Henderson wrote: > On 9/23/19 3:02 AM, Paolo Bonzini wrote: >> On 23/09/19 11:54, David Hildenbrand wrote: >>> On 23.09.19 11:51, Paolo Bonzini wrote: that includes the switches? Everything should be inlined just the same if you do if (unlike

Re: [PATCH v3 09/20] cputlb: Replace switches in load/store_helper with callback

2019-09-23 Thread Richard Henderson
On 9/23/19 3:02 AM, Paolo Bonzini wrote: > On 23/09/19 11:54, David Hildenbrand wrote: >> On 23.09.19 11:51, Paolo Bonzini wrote: >>> that includes the switches? Everything should be inlined just the same >>> if you do >>> >>> if (unlikely(tlb_addr & TLB_BSWAP)) { >>> st_memop(

Re: [PATCH v3 09/20] cputlb: Replace switches in load/store_helper with callback

2019-09-23 Thread Paolo Bonzini
On 23/09/19 11:54, David Hildenbrand wrote: > On 23.09.19 11:51, Paolo Bonzini wrote: >> On 22/09/19 05:54, Richard Henderson wrote: >>> +/* Wrap the unaligned load helpers to that they have a common signature. >>> */ >>> +static inline uint64_t wrap_ldub(const void *haddr) >>> +{ >>> +return

Re: [PATCH v3 09/20] cputlb: Replace switches in load/store_helper with callback

2019-09-23 Thread David Hildenbrand
On 23.09.19 11:51, Paolo Bonzini wrote: > On 22/09/19 05:54, Richard Henderson wrote: >> +/* Wrap the unaligned load helpers to that they have a common signature. */ >> +static inline uint64_t wrap_ldub(const void *haddr) >> +{ >> +return ldub_p(haddr); >> +} >> + >> +static inline uint64_t wr

Re: [PATCH v3 09/20] cputlb: Replace switches in load/store_helper with callback

2019-09-23 Thread Paolo Bonzini
On 22/09/19 05:54, Richard Henderson wrote: > +/* Wrap the unaligned load helpers to that they have a common signature. */ > +static inline uint64_t wrap_ldub(const void *haddr) > +{ > +return ldub_p(haddr); > +} > + > +static inline uint64_t wrap_lduw_be(const void *haddr) > +{ > +return

Re: [PATCH v3 09/20] cputlb: Replace switches in load/store_helper with callback

2019-09-23 Thread Philippe Mathieu-Daudé
On 9/22/19 5:54 AM, Richard Henderson wrote: > Add a function parameter to perform the actual load/store to ram. > With optimization, this results in identical code. > > Signed-off-by: Richard Henderson > --- > accel/tcg/cputlb.c | 159 +++-- > 1 file chan

Re: [PATCH v3 09/20] cputlb: Replace switches in load/store_helper with callback

2019-09-23 Thread David Hildenbrand
On 22.09.19 05:54, Richard Henderson wrote: > Add a function parameter to perform the actual load/store to ram. > With optimization, this results in identical code. > > Signed-off-by: Richard Henderson > --- > accel/tcg/cputlb.c | 159 +++-- > 1 file chang

[PATCH v3 09/20] cputlb: Replace switches in load/store_helper with callback

2019-09-21 Thread Richard Henderson
Add a function parameter to perform the actual load/store to ram. With optimization, this results in identical code. Signed-off-by: Richard Henderson --- accel/tcg/cputlb.c | 159 +++-- 1 file changed, 83 insertions(+), 76 deletions(-) diff --git a/accel/