diff options
author | Rashmica Gupta <rashmica.g@gmail.com> | 2019-05-07 12:42:59 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2019-05-09 14:19:46 +1000 |
commit | 99592c73e7167990082626a46ea9286c152f85fd (patch) | |
tree | bc39a5d57262bce2b33ff84092ba0af130307d1d /crypto/ppccap.c | |
parent | c3be39f2e47ec6c538ef1060d35dbee5c286ea4f (diff) |
crypto/ppccap.c: Fix which hwcap value used to check for HWCAP_ARCH_3_00
CLA: trivial
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/8889)
Diffstat (limited to 'crypto/ppccap.c')
-rw-r--r-- | crypto/ppccap.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/ppccap.c b/crypto/ppccap.c index 9601674041..0d5ab794bd 100644 --- a/crypto/ppccap.c +++ b/crypto/ppccap.c @@ -323,6 +323,7 @@ void OPENSSL_cpuid_setup(void) #ifdef OSSL_IMPLEMENT_GETAUXVAL { unsigned long hwcap = getauxval(HWCAP); + unsigned long hwcap2 = getauxval(HWCAP2); if (hwcap & HWCAP_FPU) { OPENSSL_ppccap_P |= PPC_FPU; @@ -341,11 +342,11 @@ void OPENSSL_cpuid_setup(void) if (hwcap & HWCAP_ALTIVEC) { OPENSSL_ppccap_P |= PPC_ALTIVEC; - if ((hwcap & HWCAP_VSX) && (getauxval(HWCAP2) & HWCAP_VEC_CRYPTO)) + if ((hwcap & HWCAP_VSX) && (hwcap2 & HWCAP_VEC_CRYPTO)) OPENSSL_ppccap_P |= PPC_CRYPTO207; } - if (hwcap & HWCAP_ARCH_3_00) { + if (hwcap2 & HWCAP_ARCH_3_00) { OPENSSL_ppccap_P |= PPC_MADD300; } } |