diff options
author | Jack Lloyd <[email protected]> | 2017-08-22 19:58:26 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-08-22 19:58:26 -0400 |
commit | d97fd8356fc1eaacf44f636dcf31b4dae057cb74 (patch) | |
tree | 6fdafd2b774a1ce6b6fbff396c48f271b636cdae | |
parent | 11561110dee4d09fd65119592c8ed44a2f1dd983 (diff) |
Fix Altivec detection
Broken in c3ae43c04c
-rw-r--r-- | news.rst | 2 | ||||
-rw-r--r-- | src/lib/utils/cpuid.cpp | 4 |
2 files changed, 4 insertions, 2 deletions
@@ -35,6 +35,8 @@ Version 2.3.0, Not Yet Released * Workaround a GCC 7 bug that caused miscompilation of the GOST-34.11 hash function on x86-32. (GH #882 #1148) +* Fix Altivec runtime detection, which was broken starting in Botan 2.1.0 + * Silence a Clang warning in create_private_key (GH #1150) * Fix a bug in FFI tests that caused the test files not to be found when using diff --git a/src/lib/utils/cpuid.cpp b/src/lib/utils/cpuid.cpp index 59e8991ab..6645505af 100644 --- a/src/lib/utils/cpuid.cpp +++ b/src/lib/utils/cpuid.cpp @@ -84,7 +84,7 @@ uint64_t powerpc_detect_cpu_featutures() int error = sysctl(sels, 2, &vector_type, &length, NULL, 0); if(error == 0 && vector_type > 0) - return (1ULL << CPUID::CPUID_ALTIVEC_BIT); + return CPUID::CPUID_ALTIVEC_BIT; #elif defined(BOTAN_TARGET_OS_IS_LINUX) || defined(BOTAN_TARGET_OS_IS_NETBSD) /* @@ -120,7 +120,7 @@ uint64_t powerpc_detect_cpu_featutures() pvr == PVR_POWER6 || pvr == PVR_POWER7 || pvr == PVR_POWER8 || pvr == PVR_CELL_PPU) { - return (1ULL << CPUID::CPUID_ALTIVEC_BIT); + return CPUID::CPUID_ALTIVEC_BIT; } #else #warning "No PowerPC feature detection available for this platform" |