]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
s390/bitops: Use __assume() for __flogr() inline assembly return value
authorHeiko Carstens <hca@linux.ibm.com>
Tue, 16 Sep 2025 13:48:02 +0000 (15:48 +0200)
committerAlexander Gordeev <agordeev@linux.ibm.com>
Thu, 18 Sep 2025 12:06:40 +0000 (14:06 +0200)
commit79161603952c842eb22313f2060051b359b0a592
tree0fa4197ad426e1eac6b44b3acf6103c5278e85d1
parentf72e2cff13aefe305fc8fc6afe4f43626e4ad88c
s390/bitops: Use __assume() for __flogr() inline assembly return value

Use __assume() to tell compilers that the output operand of the __flogr()
inline assembly contains a value in the range of 0..64. This allows to
optimize the logical AND operation away.

This reduces the kernel image size by 2804 bytes (defconfig, gcc 15.2.0).

Suggested-by: Juergen Christ <jchrist@linux.ibm.com>
Reviewed-by: Juergen Christ <jchrist@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
arch/s390/include/asm/bitops.h