News for hackers. Stuff that matters.
Re:EABitTricks.h by rsaxvc on Monday December 19, 2022 @01:24PM (#34055610)
I haven't tested this, but on Arm32 platforms, this isn't a bad way to do it n some 32-bit machines.

If the compiler recognizes the 32-bit approach and rbit is available, the 64-bit variant is usually 2 rbits with the registers swapped.

Re:EABitTricks.h by thomasahle on Monday December 19, 2022 @01:58PM (#34056083)
If the compiler can recognize the 32-bit version, it really should be able to recognize the 64-bit version too, no?
Re:EABitTricks.h by rsaxvc on Monday December 19, 2022 @02:13PM (#34056266)
Ideally yes. Only last year did Clang 13 learn the 32-bit one. GCC doesn't understand either. I haven't checked clang for the 64-bit one.