3 ms·
Interesting... My AMD64 Programmer's Manual says, about "Rotate Left": "The processor masks the upper three bits of the count operand, thus restricting the coun
by waterhouse 9y ago
Interesting... My AMD64 Programmer's Manual says, about "Rotate Left": "The processor masks the upper three bits of the count operand, thus restricting the count to a number between 0 and 31. When the destination is 64 bits wide, it masks the upper two bits of the count, providing a count in the range of 0 to 63."
Are there x86 platforms that don't do that? (I don't know if there's a more official document than the AMD64 manual. Technically Intel's stuff is made to be compatible with a standard that AMD first created.) If not, yeah, that's a nice, clear case of a missed optimization.
- userbinator 9y agoIntel's official reference says the count is masked too, with an interesting note that the 8086 (and presumably '186) doesn't.