Name:
Anonymous
2014-09-23 19:08
Modern compilers generate them, though:
http://en.wikipedia.org/wiki/Circular_shift#Implementing_circular_shiftsGCC outputs something like this for the ROR on the wiki page:
movl 4(%esp), %eax
movl 8(%esp), %ecx
rorl %cl, %eax
ret
Name:
Anonymous
2014-09-24 2:49
They are useful as an optimization for:
1. circular buffers/patterns.
2. extract sign + parity bits as in single 2-bit value.