[PATCH 1/5] ARM: findbit: document ARMv5 bit offset calculation
Linus Torvalds
torvalds at linux-foundation.org
Fri Oct 28 10:05:29 PDT 2022
On Fri, Oct 28, 2022 at 9:47 AM Russell King (Oracle)
<rmk+kernel at armlinux.org.uk> wrote:
>
> Document the ARMv5 bit offset calculation code.
Hmm. Don't the generic bitop functions end up using this? We do have a
comment in the code that says
* On ARMv5 and above, the gcc built-ins may rely on the clz instruction
* and produce optimal inlined code in all cases. On ARMv7 it is even
* better by also using the rbit instruction.
but that 'may' makes me wonder...
IOW, what is it in the hand-written code that doesn't get done by the
generic code these days?
Linus
More information about the linux-arm-kernel
mailing list