summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2021-07-01 16:59:30 +1000
committerPauli <pauli@openssl.org>2021-07-06 10:49:01 +1000
commit1627a41f1db38c0e762cbbcb452a869924370561 (patch)
treef0ac728b299c946610815ae0254cf1bf07f8e0f7 /crypto
parente7370fa016cc3d8a8f2c3a8d0c30a6a656bb622c (diff)
bn: Make fixed-length Montgomery Multiplication conditional on PPC64
This code is currently unconditional even though build.info has: $BNASM_ppc64=$BNASM_ppc32 ppc64-mont-fixed.s This causes a build failure on 32-bit systems. Fixes #15923 Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15971)
Diffstat (limited to 'crypto')
-rw-r--r--crypto/bn/bn_ppc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/bn/bn_ppc.c b/crypto/bn/bn_ppc.c
index 24b384acbd..05c0c4cb92 100644
--- a/crypto/bn/bn_ppc.c
+++ b/crypto/bn/bn_ppc.c
@@ -40,12 +40,14 @@ int bn_mul_mont(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,
* no opportunity to figure it out...
*/
+#if defined(_ARCH_PPC64)
if (num == 6) {
if (OPENSSL_ppccap_P & PPC_MADD300)
return bn_mul_mont_300_fixed_n6(rp, ap, bp, np, n0, num);
else
return bn_mul_mont_fixed_n6(rp, ap, bp, np, n0, num);
}
+#endif
return bn_mul_mont_int(rp, ap, bp, np, n0, num);
}