Re: [PATCH] tcg/i386: Check for shorter instruction sequence for ARITH_AND

2023-08-07 Thread Helge Deller
On 8/7/23 20:57, Richard Henderson wrote: On 8/7/23 07:28, Helge Deller wrote: The tcg uses tgen_arithi(ARITH_AND) during fast CPU TLB lookups, which e.g. translates to: 0x7ff5b011556a:  48 81 e6 00 f0 ff ff andq $0xf000, %rsi In case the upper 48 bits are all set, the shor

Re: [PATCH] tcg/i386: Check for shorter instruction sequence for ARITH_AND

2023-08-07 Thread Richard Henderson
On 8/7/23 07:28, Helge Deller wrote: The tcg uses tgen_arithi(ARITH_AND) during fast CPU TLB lookups, which e.g. translates to: 0x7ff5b011556a: 48 81 e6 00 f0 ff ff andq $0xf000, %rsi In case the upper 48 bits are all set, the shorter sequence to operate on the lower 16 bit

[PATCH] tcg/i386: Check for shorter instruction sequence for ARITH_AND

2023-08-07 Thread Helge Deller
The tcg uses tgen_arithi(ARITH_AND) during fast CPU TLB lookups, which e.g. translates to: 0x7ff5b011556a: 48 81 e6 00 f0 ff ff andq $0xf000, %rsi In case the upper 48 bits are all set, the shorter sequence to operate on the lower 16 bits of the target reg (si) can be used, w