Skip to content

Commit

Permalink
Do not build P10-specific Chacha20 assembler on AIX
Browse files Browse the repository at this point in the history
Fixes #18145

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from #19865)
  • Loading branch information
t8m committed Dec 14, 2022
1 parent cda5515 commit cdcc439
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 4 additions & 1 deletion crypto/chacha/build.info
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions crypto/chacha/chacha_ppc.c
Expand Up @@ -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)
Expand Down

0 comments on commit cdcc439

Please sign in to comment.