diff options
| author | Sean Anderson <[email protected]> | 2023-07-31 17:27:33 -0400 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2023-08-17 16:39:20 -0400 |
| commit | 726a802fdaf1ffb4ca95ebf6910a738781137ef5 (patch) | |
| tree | 7d2df62ee83092d7b8b6032f48a980b2a212df8c /include/linux | |
| parent | 14ba0a8bbc342a677982acc787ae542b84ed7993 (diff) | |
arm: Use builtins for ffs/fls
Since ARMv5, the clz instruction allows for efficient implementation of
ffs/fls with builtins. Until ARMv7 (with Thumb-2), this instruction is
only available in ARM mode. LTO makes it difficult to force specific
functions to be in ARM mode, as it is effectively a form of very
aggressive inlining. To work around this, fls/ffs are implemented in
assembly for ARMv5 and ARMv6 when compiling U-Boot in Thumb mode.
Overall, this saves around 75 bytes per call.
This code is synced with v5.15 of the Linux kernel.
Signed-off-by: Sean Anderson <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
