diff options
author | Tomas Mraz <tomas@openssl.org> | 2022-12-08 17:26:19 +0100 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2022-12-14 12:50:53 +0100 |
commit | cdcc439aa0acba8a50b5e3444fb12d6e1157b991 (patch) | |
tree | e6fd1406202ae52639975890a5f9406f5a8e669f /crypto/chacha | |
parent | cda5515a5ef34ac58acb78ea56756da9fdd18c91 (diff) |
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)
Diffstat (limited to 'crypto/chacha')
-rw-r--r-- | crypto/chacha/build.info | 5 | ||||
-rw-r--r-- | crypto/chacha/chacha_ppc.c | 6 |
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) |