Re: [RFC][PATCH] Reduce generated code by 3% by increasing MMU indices

2023-08-05 Thread Richard Henderson
On 8/5/23 13:04, Helge Deller wrote: On 8/5/23 21:40, Helge Deller wrote: On 8/5/23 19:58, Richard Henderson wrote: On 8/5/23 10:43, Helge Deller wrote: If there were a way to change no more than two lines of code, that would be fine.  But otherwise I don't see this as being worth making the r

Re: [RFC][PATCH] Reduce generated code by 3% by increasing MMU indices

2023-08-05 Thread Helge Deller
On 8/5/23 21:40, Helge Deller wrote: On 8/5/23 19:58, Richard Henderson wrote: On 8/5/23 10:43, Helge Deller wrote: If there were a way to change no more than two lines of code, that would be fine.  But otherwise I don't see this as being worth making the rest of the code base any more complex.

Re: [RFC][PATCH] Reduce generated code by 3% by increasing MMU indices

2023-08-05 Thread Helge Deller
On 8/5/23 19:58, Richard Henderson wrote: On 8/5/23 10:43, Helge Deller wrote: If there were a way to change no more than two lines of code, that would be fine. But otherwise I don't see this as being worth making the rest of the code base any more complex. Ok. What about that 6-line patch be

Re: [RFC][PATCH] Reduce generated code by 3% by increasing MMU indices

2023-08-05 Thread Richard Henderson
On 8/5/23 10:43, Helge Deller wrote: If there were a way to change no more than two lines of code, that would be fine. But otherwise I don't see this as being worth making the rest of the code base any more complex. Ok. What about that 6-line patch below for x86? It's trivial and all what's ne

Re: [RFC][PATCH] Reduce generated code by 3% by increasing MMU indices

2023-08-05 Thread Helge Deller
* Richard Henderson : > On 8/5/23 09:47, Helge Deller wrote: > > Do we want to enable such an performance optimization? > > If so, I see two possibilities: > > > > a) Re-define NB_MMU_MODES per target > > No, we've just gotten rid of per target definitions of NB_MMU_MODES, on the > way to being abl

Re: [RFC][PATCH] Reduce generated code by 3% by increasing MMU indices

2023-08-05 Thread Richard Henderson
On 8/5/23 09:47, Helge Deller wrote: Do we want to enable such an performance optimization? If so, I see two possibilities: a) Re-define NB_MMU_MODES per target No, we've just gotten rid of per target definitions of NB_MMU_MODES, on the way to being able to support multiple targets simultaneo

[RFC][PATCH] Reduce generated code by 3% by increasing MMU indices

2023-08-05 Thread Helge Deller
This is a RFC, in which I want to bring up an option on how to reduce the generated code size by in average 6 bytes for *every* memory-access inside the guest. This applies to nearly every guest target on a x86 host. Other hosts may benefit too, but I didn't checked. In include/exec/cpu-defs.h the