aboutsummaryrefslogtreecommitdiff
path: root/lib/time.c
diff options
context:
space:
mode:
authorSean Anderson <sean.anderson@seco.com>2023-07-31 17:27:33 -0400
committerTom Rini <trini@konsulko.com>2023-08-17 16:39:20 -0400
commit726a802fdaf1ffb4ca95ebf6910a738781137ef5 (patch)
tree7d2df62ee83092d7b8b6032f48a980b2a212df8c /lib/time.c
parent14ba0a8bbc342a677982acc787ae542b84ed7993 (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 <sean.anderson@seco.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'lib/time.c')
0 files changed, 0 insertions, 0 deletions