------- Additional Comments From mmitchel at gcc dot gnu dot org 2005-09-29 05:05 ------- Here's the best I can think of for the first case, assuming that %ecx contains the rotate-left count, %eax contains the low order word, and %ebx contains the high-order word.
mov %eax, %ebx cmp %ecx, $32 ja l1 je l2 shldl %cl, %edx, %eax shldl %cl, %ebx, %edx jmp l3 l1: negl %ecx shrdl %cl, %edx, %eax shrdl %cl, %ebx, %edx jmp l3 l2: mov %edx, %eax mov %ebx, %edx l3: I have no current plans to try to teach GCC to generate that, though. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17886