summaryrefslogtreecommitdiff
path: root/crypto/ppccap.c
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2018-06-05 20:00:46 +0200
committerAndy Polyakov <appro@openssl.org>2018-06-06 22:14:15 +0200
commit316d527ff9b6597105df399fc222ea328cd827bf (patch)
treea6dace85fc079c66a5e4222521b6302774627377 /crypto/ppccap.c
parent791cc3029bd2aee7fc6b766b9841ce1e0a14484a (diff)
downloadopenssl-new-316d527ff9b6597105df399fc222ea328cd827bf.tar.gz
crypto/ppccap.c: wire new ChaCha20_ctr32_vsx.
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6419)
Diffstat (limited to 'crypto/ppccap.c')
-rw-r--r--crypto/ppccap.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/crypto/ppccap.c b/crypto/ppccap.c
index f8b7c007a5..8b7d765c3a 100644
--- a/crypto/ppccap.c
+++ b/crypto/ppccap.c
@@ -90,13 +90,18 @@ void ChaCha20_ctr32_int(unsigned char *out, const unsigned char *inp,
void ChaCha20_ctr32_vmx(unsigned char *out, const unsigned char *inp,
size_t len, const unsigned int key[8],
const unsigned int counter[4]);
+void ChaCha20_ctr32_vsx(unsigned char *out, const unsigned char *inp,
+ size_t len, const unsigned int key[8],
+ const unsigned int counter[4]);
void ChaCha20_ctr32(unsigned char *out, const unsigned char *inp,
size_t len, const unsigned int key[8],
const unsigned int counter[4])
{
- OPENSSL_ppccap_P & PPC_ALTIVEC
- ? ChaCha20_ctr32_vmx(out, inp, len, key, counter)
- : ChaCha20_ctr32_int(out, inp, len, key, counter);
+ 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)
+ : ChaCha20_ctr32_int(out, inp, len, key, counter);
}
#endif