https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110479
Thomas Koenig <tkoenig at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #2 from Thomas Koenig <tkoenig at gcc dot gnu.org> --- (In reply to Uroš Bizjak from comment #1) > (In reply to Thomas Koenig from comment #0) > > > movl %edi, %ecx > > This one? It is needed because SAL wants its count argument in %cl and first > argument is passed in %edi (mandated by x86_64 ABI). > > With -mbmi2, one gets: > > shrl $10, %edi > movl $1, %eax > andl $3, %edi > addl $3, %edi > shlx %edi, %eax, %eax > ret Hm, you're right. The intricacies of x86... Closing.