Earlier quoted context omitted.
So you can have bit arrays of any length in memory, rather than just 32 bits in a register.
That makes sense. LLVM could probably do better here by using the memory operand version: https://godbolt.org/z/jeqbaPsMz
80386 Barrel Shifter
11–14 of 14 posts
Re: 80386 Barrel Shifter
#12Earlier quoted context omitted.
So you can have bit arrays of any length in memory, rather than just 32 bits in a register.
That makes sense. LLVM could probably do better here by using the memory operand version: https://godbolt.org/z/jeqbaPsMz
Re: 80386 Barrel Shifter
#13Implementing rotate through carry like that was a really bad decision IMO - it's almost never by more than one bit left or right at a time, and this could be done much more efficiently than with the constant-time code which is only faster when the count is > 6. Is the full microcode available anywhere?
Re: 80386 Barrel Shifter
#14Earlier quoted context omitted.
That makes sense. LLVM could probably do better here by using the memory operand version: https://godbolt.org/z/jeqbaPsMz
The memory operand version tends to be as slow or slower than the manual implementation, so LLVM is right to avoid it.
Memory: https://uica.uops.info/tmp/f022a3c0a70e4ae5ab3588ebe65fd2a5_...
Register: https://uica.uops.info/tmp/e80e60e0c4914955b11dc6590711c1b8_...