s390: provide word-at-a-time implementation
authorHeiko Carstens <hca@linux.ibm.com>
Fri, 6 Oct 2023 13:42:41 +0000 (15:42 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Mon, 16 Oct 2023 11:04:09 +0000 (13:04 +0200)
commit76292d7243f809486ec26dd6cd3436dbcb9e5319
treeed94521d81a64c9e2e17d68da82a0b800516d1cb
parent88b2c332fcecbcf71a5d69a214a8805cf916fbf8
s390: provide word-at-a-time implementation

Provide an s390 specific word-at-a-time implementation. Compared to the
generic variant the generated code for has_zero() is slightly
better. However find_zero() is much simpler since it reuses the result
of __fls() aka flogr() and now comes without any conditional branches,
while the generic variant has three of them.

Reviewed-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/include/asm/word-at-a-time.h [new file with mode: 0644]