Alexander Monakov wrote: > On Wed, 4 Aug 2021, Stefan Kanthak wrote: >> The change just follows by removing 6 LOC/instructions.-) > > Have you considered collecting the three bits in one go via a multiplication? No. My mind is not that twisted;-) > You can first isolate the necessary bits with 'and $0x4300, %eax', then do > 'imul $0x910000, %eax, %eax' to put the required bits in EAX[31:29] in the > right order, then shift right by 29. Three instructions, 14 bytes. Thanks, VERY NICE! How did you come up to it? Revised patch with shorter bit twiddling attached. Stefan