summaryrefslogtreecommitdiff
path: root/crypto/chacha
diff options
context:
space:
mode:
authorTomas Mraz <tomas@openssl.org>2022-12-08 17:26:19 +0100
committerTomas Mraz <tomas@openssl.org>2022-12-14 12:53:00 +0100
commitabfc152126616d6f7c1cb1b9cbe8def9f18a1a96 (patch)
tree64b84f24d4575c8f50b89b6a4d176257efb747dc /crypto/chacha
parent97446da7e05bd7164f5c36b68b8bef13a63e06a5 (diff)
downloadopenssl-new-abfc152126616d6f7c1cb1b9cbe8def9f18a1a96.tar.gz
Do not build P10-specific Chacha20 assembler on AIX
Fixes #18145 Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19865) (cherry picked from commit cdcc439aa0acba8a50b5e3444fb12d6e1157b991)
Diffstat (limited to 'crypto/chacha')
-rw-r--r--crypto/chacha/build.info5
-rw-r--r--crypto/chacha/chacha_ppc.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/crypto/chacha/build.info b/crypto/chacha/build.info
index d0400db24d..b8c0a7870b 100644
--- a/crypto/chacha/build.info
+++ b/crypto/chacha/build.info
@@ -12,7 +12,10 @@ IF[{- !$disabled{asm} -}]
$CHACHAASM_armv4=chacha-armv4.S
$CHACHAASM_aarch64=chacha-armv8.S chacha-armv8-sve.S
- $CHACHAASM_ppc32=chacha_ppc.c chacha-ppc.s chachap10-ppc.s
+ $CHACHAASM_ppc32=chacha_ppc.c chacha-ppc.s
+ IF[{- $target{sys_id} ne "AIX" -}]
+ $CHACHAASM_ppc32=chacha_ppc.c chacha-ppc.s chachap10-ppc.s
+ ENDIF
$CHACHAASM_ppc64=$CHACHAASM_ppc32
$CHACHAASM_c64xplus=chacha-c64xplus.s
diff --git a/crypto/chacha/chacha_ppc.c b/crypto/chacha/chacha_ppc.c
index 9435598452..05d8cf100d 100644
--- a/crypto/chacha/chacha_ppc.c
+++ b/crypto/chacha/chacha_ppc.c
@@ -30,9 +30,11 @@ void ChaCha20_ctr32(unsigned char *out, const unsigned char *inp,
size_t len, const unsigned int key[8],
const unsigned int counter[4])
{
+#ifndef OPENSSL_SYS_AIX
OPENSSL_ppccap_P & PPC_BRD31
- ? ChaCha20_ctr32_vsx_p10(out, inp, len, key, counter)
- :OPENSSL_ppccap_P & PPC_CRYPTO207
+ ? ChaCha20_ctr32_vsx_p10(out, inp, len, key, counter) :
+#endif
+ OPENSSL_ppccap_P & PPC_CRYPTO207
? ChaCha20_ctr32_vsx(out, inp, len, key, counter)
: OPENSSL_ppccap_P & PPC_ALTIVEC
? ChaCha20_ctr32_vmx(out, inp, len, key, counter)