Hello, On Thu, 12 Nov 2020, Stefan Kanthak wrote:
> Does GCC generate (unoptimised) code there, similar to the following i386
> assembly, using 4 loads, 4 shifts, 2 ands plus 3 ors?
Try for yourself. '-m32 -O2 -march=i386' is your friend.
Ciao,
Michael.
Spoiler: it's generating:
movl 4(%esp), %eax
rolw $8, %ax
roll $16, %eax
rolw $8, %ax
ret
