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:53:00 +0100 |
commit | abfc152126616d6f7c1cb1b9cbe8def9f18a1a96 (patch) | |
tree | 64b84f24d4575c8f50b89b6a4d176257efb747dc /crypto | |
parent | 97446da7e05bd7164f5c36b68b8bef13a63e06a5 (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)
(cherry picked from commit cdcc439aa0acba8a50b5e3444fb12d6e1157b991)
Diffstat (limited to 'crypto')
-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) |