[PATCH 3/6] bithelp: fix __riscv_zbb check for _gcry_ctz_no_zero
Jussi Kivilinna
jussi.kivilinna at iki.fi
Thu Aug 7 15:28:52 CEST 2025
* cipher/bithelp.h (_gcry_ctz_no_zero): Fix __riscv_zbb version check.
--
Signed-off-by: Jussi Kivilinna <jussi.kivilinna at iki.fi>
---
cipher/bithelp.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cipher/bithelp.h b/cipher/bithelp.h
index a4faf345..50731650 100644
--- a/cipher/bithelp.h
+++ b/cipher/bithelp.h
@@ -84,7 +84,7 @@ _gcry_ctz_no_zero (unsigned int x)
{
#if defined(__riscv) && \
(defined(__riscv_f) && __riscv_f >= 2002000) && \
- (!defined(__riscv_zbb) || __riscv_zbb < 2002000) && \
+ (!defined(__riscv_zbb) || __riscv_zbb < 1000000) && \
defined(HAVE_GCC_ATTRIBUTE_MAY_ALIAS)
/* Use float cast approach when building for RISC-V without Zbb extension.
* Without Zbb, GCC gives us slower generic version for __builtin_ctz().
--
2.48.1
More information about the Gcrypt-devel
mailing list