Skip to content

Commit 34ca4ec

Browse files
ebiggerspalmer-dabbelt
authored andcommitted
RISC-V: add TOOLCHAIN_HAS_VECTOR_CRYPTO
Add a kconfig symbol that indicates whether the toolchain supports the vector crypto extensions. This is needed by the RISC-V crypto code. Signed-off-by: Eric Biggers <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent df513ed commit 34ca4ec

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

arch/riscv/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,13 @@ config TOOLCHAIN_HAS_ZBB
578578
depends on LLD_VERSION >= 150000 || LD_VERSION >= 23900
579579
depends on AS_HAS_OPTION_ARCH
580580

581+
# This symbol indicates that the toolchain supports all v1.0 vector crypto
582+
# extensions, including Zvk*, Zvbb, and Zvbc. LLVM added all of these at once.
583+
# binutils added all except Zvkb, then added Zvkb. So we just check for Zvkb.
584+
config TOOLCHAIN_HAS_VECTOR_CRYPTO
585+
def_bool $(as-instr, .option arch$(comma) +zvkb)
586+
depends on AS_HAS_OPTION_ARCH
587+
581588
config RISCV_ISA_ZBB
582589
bool "Zbb extension support for bit manipulation instructions"
583590
depends on TOOLCHAIN_HAS_ZBB

0 commit comments

Comments
 (0)