summaryrefslogtreecommitdiffstats
path: root/crypto/evp
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2014-07-20 14:36:49 +0200
committerAndy Polyakov <appro@openssl.org>2014-07-20 14:36:49 +0200
commitc991d8ae8bf712983ba527eef43388d8bb120a03 (patch)
tree7ddbeafe135648b3f22d561c56e9ee9fea540203 /crypto/evp
parentbe12cb3e24ad15343e83e826a63a9aa4a3edaea7 (diff)
Initial POWER8 support from development branch.
Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'crypto/evp')
-rw-r--r--crypto/evp/e_aes.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/crypto/evp/e_aes.c b/crypto/evp/e_aes.c
index ae1fd0a2ed..ef76da93a4 100644
--- a/crypto/evp/e_aes.c
+++ b/crypto/evp/e_aes.c
@@ -155,9 +155,18 @@ void AES_xts_decrypt(const char *inp,char *out,size_t len,
const unsigned char iv[16]);
#endif
-#if defined(VPAES_ASM) && (defined(__powerpc__) || defined(__ppc__) || defined(_ARCH_PPC))
-extern unsigned int OPENSSL_ppccap_P;
-#define VPAES_CAPABLE (OPENSSL_ppccap_P&(1<<1))
+#if defined(OPENSSL_CPUID_OBJ) && (defined(__powerpc__) || defined(__ppc__) || defined(_ARCH_PPC))
+# include "ppc_arch.h"
+# ifdef VPAES_ASM
+# define VPAES_CAPABLE (OPENSSL_ppccap_P & PPC_ALTIVEC)
+# endif
+# define HWAES_CAPABLE (OPENSSL_ppccap_P & PPC_CRYPTO207)
+# define HWAES_set_encrypt_key aes_p8_set_encrypt_key
+# define HWAES_set_decrypt_key aes_p8_set_decrypt_key
+# define HWAES_encrypt aes_p8_encrypt
+# define HWAES_decrypt aes_p8_decrypt
+# define HWAES_cbc_encrypt aes_p8_cbc_encrypt
+# define HWAES_ctr32_encrypt_blocks aes_p8_ctr32_encrypt_blocks
#endif
#if defined(AES_ASM) && !defined(I386_ONLY) && ( \