From 626c86987bd19bac09b41aedc0bc29c295e866d0 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Mon, 5 Mar 2018 07:05:12 -0500 Subject: [PATCH] Fix SHA feature detection on AIX This one should have been fixed before the Crypto++ 6.1 release. Its no big deal, however. Power8 accelerated SHA-256 is 1.5x to 2x slower than straight C++. SHA-512 may be better, but the implementation is not ready to performance test. --- ppc-simd.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ppc-simd.cpp b/ppc-simd.cpp index c9affcd3..a6820cc6 100644 --- a/ppc-simd.cpp +++ b/ppc-simd.cpp @@ -255,7 +255,7 @@ bool CPU_ProbeSHA256() x = VectorSHA256<1,1>(x); VectorStore(x, r); - result = (0 != std::memcmp(r, z, 16)); + result = (0 == std::memcmp(r, z, 16)); } sigprocmask(SIG_SETMASK, (sigset_t*)&oldMask, NULLPTR); @@ -299,7 +299,7 @@ bool CPU_ProbeSHA512() x = VectorSHA512<1,1>(x); VectorStore(x, r); - result = (0 != std::memcmp(r, z, 16)); + result = (0 == std::memcmp(r, z, 16)); } sigprocmask(SIG_SETMASK, (sigset_t*)&oldMask, NULLPTR);