Commit 6c4e0cb3 authored by Heiko Carstens's avatar Heiko Carstens Committed by Alexander Gordeev
Browse files

s390/bitops: Switch to generic ffs() if supported by compiler



Use generic ffs() / __builtin_ffs() if supported by the compiler. GCC 16
will have support for __builtin_ffs().
See gcc commit f50cff9766c5 ("s390: Implement clz and ctz for SI mode").

In the distant future when GCC 16 becomes the minimum supported version,
this allows to get rid of the flogr inline assembly.

Kernel image size is reduced by ~500 bytes (gcc 16 beta + defconfig).

Acked-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Signed-off-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
parent 7b80a23c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment