[openssl] master update

Dr. Paul Dale pauli at openssl.org
Tue Jul 6 00:49:58 UTC 2021


The branch master has been updated
       via  1627a41f1db38c0e762cbbcb452a869924370561 (commit)
       via  e7370fa016cc3d8a8f2c3a8d0c30a6a656bb622c (commit)
       via  bf9b78214d651f84ca328506fee1bd0bd857fed8 (commit)
      from  643ce3108f88751c44348335bed91e475d50677d (commit)


- Log -----------------------------------------------------------------
commit 1627a41f1db38c0e762cbbcb452a869924370561
Author: Martin Schwenke <martin at meltin.net>
Date:   Thu Jul 1 16:59:30 2021 +1000

    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 at meltin.net>
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    Reviewed-by: Paul Dale <pauli at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/15971)

commit e7370fa016cc3d8a8f2c3a8d0c30a6a656bb622c
Author: Martin Schwenke <martin at meltin.net>
Date:   Thu Jul 1 14:44:33 2021 +1000

    bn: Fix .size directive
    
    This requires the text address.
    
    Fixes #15923
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    Reviewed-by: Paul Dale <pauli at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/15971)

commit bf9b78214d651f84ca328506fee1bd0bd857fed8
Author: Martin Schwenke <martin at meltin.net>
Date:   Thu Jul 1 14:23:50 2021 +1000

    bn: Use a basic branch-if-not-zero
    
    Ancient toolchains fail the build because they don't like the hints,
    newer ISAs recommend not using the hints and relying on dynamic branch
    prediction.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    Reviewed-by: Paul Dale <pauli at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/15971)

-----------------------------------------------------------------------

Summary of changes:
 crypto/bn/asm/ppc64-mont-fixed.pl | 4 ++--
 crypto/bn/bn_ppc.c                | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/crypto/bn/asm/ppc64-mont-fixed.pl b/crypto/bn/asm/ppc64-mont-fixed.pl
index da4967a730..56df89dc27 100755
--- a/crypto/bn/asm/ppc64-mont-fixed.pl
+++ b/crypto/bn/asm/ppc64-mont-fixed.pl
@@ -267,7 +267,7 @@ ___
 	addze		$tp[$n],$tp[$n+1]
 
 	addi		$i,$i,$SIZE_T
-	bc		25,0,$label->{"outer"}
+	bdnz		$label->{"outer"}
 
 	and.		$tp[$n],$tp[$n],$tp[$n]
 	bne		$label->{"sub"}
@@ -322,7 +322,7 @@ ___
 	$self->add_code(<<___);
 	li		r3,1
 	blr
-.size ${fname},.-${fname}
+.size .${fname},.-.${fname}
 ___
 
 }
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);
 }


More information about the openssl-commits mailing list