From 1eba9fb10460fb9e2229113e8b03182b61a5645d Mon Sep 17 00:00:00 2001 From: Russell Currey Date: Fri, 30 Jul 2021 18:28:08 +1000 Subject: [PATCH] Fix the ppc bn_mul_mont() to use the new prefix system The symbol prefix changes that began in commit 384f7d056b1 require that cpu-ppc.c finds the generated prefix header and that bigint.rs looks for the correctly prefixed bn_mul_mont(). Signed-off-by: Russell Currey --- crypto/cpu-ppc.c | 5 +++-- src/arithmetic/bigint.rs | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/crypto/cpu-ppc.c b/crypto/cpu-ppc.c index 64f87b2b73..3d18520a57 100644 --- a/crypto/cpu-ppc.c +++ b/crypto/cpu-ppc.c @@ -8,13 +8,14 @@ */ /* This file is derived from ppccap.c in OpenSSL */ - +// Must be included for bn_mul_mont to have the correct symbol +#include int bn_mul_mont_int(unsigned long *rp, const unsigned long *ap, const unsigned long *bp, const unsigned long *np, const unsigned long *n0, int num); int bn_mul4x_mont_int(unsigned long *rp, const unsigned long *ap, const unsigned long *bp, const unsigned long *np, const unsigned long *n0, int num); -int GFp_bn_mul_mont(unsigned long *rp, const unsigned long *ap, const unsigned long *bp, +int bn_mul_mont(unsigned long *rp, const unsigned long *ap, const unsigned long *bp, const unsigned long *np, const unsigned long *n0, int num) { if (num < 4) diff --git a/src/arithmetic/bigint.rs b/src/arithmetic/bigint.rs index 61a4a15e09..2d01a1f76f 100644 --- a/src/arithmetic/bigint.rs +++ b/src/arithmetic/bigint.rs @@ -1381,7 +1381,8 @@ fn limbs_mont_square(r: &mut [Limb], m: &[Limb], n0: &N0, _cpu_features: cpu::Fe target_arch = "aarch64", target_arch = "arm", target_arch = "x86_64", - target_arch = "x86" + target_arch = "x86", + target_arch = "powerpc64" ))] prefixed_extern! { // `r` and/or 'a' and/or 'b' may alias.