From 43820e82ed3878aafe3b39d5180ec46006e17378 Mon Sep 17 00:00:00 2001 From: "Diego F. Aranha" Date: Thu, 8 Aug 2024 15:47:53 +0200 Subject: [PATCH] Reverting, did not work. --- src/bn/relic_bn_smb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bn/relic_bn_smb.c b/src/bn/relic_bn_smb.c index 3d9653fd3..d1446ae0e 100644 --- a/src/bn/relic_bn_smb.c +++ b/src/bn/relic_bn_smb.c @@ -126,7 +126,7 @@ int bn_smb_jac(const bn_t a, const bn_t b) { n = (n - d) >> 1; t ^= d ^ (d >> 1); } else { - z = __builtin_ctz(n); + z = arch_tzcnt(n); t ^= (d ^ (d >> 1)) & (z << 1); n >>= z; } @@ -135,7 +135,7 @@ int bn_smb_jac(const bn_t a, const bn_t b) { break; } - z = RLC_MIN(__builtin_clz(t0->dp[i - 1]), __builtin_clz(t1->dp[i - 1])); + z = RLC_MIN(arch_lzcnt(t0->dp[i - 1]), arch_lzcnt(t1->dp[i - 1])); n = t0->dp[i - 1] << z; d = t1->dp[i - 1] << z; if (z > (RLC_DIG >> 1)) {