RISC-V: add zbb support to string functions
authorHeiko Stuebner <heiko.stuebner@vrull.eu>
Fri, 13 Jan 2023 21:23:01 +0000 (22:23 +0100)
committerPalmer Dabbelt <palmer@rivosinc.com>
Tue, 31 Jan 2023 19:43:24 +0000 (11:43 -0800)
commitb6fcdb191e36f82336f9b5e126d51c02e7323480
tree9478e9f2e5141295105137ec3e62e1aa9e6141d2
parent56e0790c7f9e59ba6a0f4b59981d1d6fbf43efb0
RISC-V: add zbb support to string functions

Add handling for ZBB extension and add support for using it as a
variant for optimized string functions.

Support for the Zbb-str-variants is limited to the GNU-assembler
for now, as LLVM has not yet acquired the functionality to
selectively change the arch option in assembler code.
This is still under review at
    https://reviews.llvm.org/D123515

Co-developed-by: Christoph Muellner <christoph.muellner@vrull.eu>
Signed-off-by: Christoph Muellner <christoph.muellner@vrull.eu>
Signed-off-by: Heiko Stuebner <heiko.stuebner@vrull.eu>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20230113212301.3534711-3-heiko@sntech.de
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/Kconfig
arch/riscv/include/asm/errata_list.h
arch/riscv/include/asm/hwcap.h
arch/riscv/kernel/cpu.c
arch/riscv/kernel/cpufeature.c
arch/riscv/lib/strcmp.S
arch/riscv/lib/strlen.S
arch/riscv/lib/strncmp.S