summaryrefslogtreecommitdiff
path: root/gcm_simd.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2019-04-27 20:35:01 -0400
committerGitHub <noreply@github.com>2019-04-27 20:35:01 -0400
commit39418a85122fa7954cca6354be30a44d6335874e (patch)
treeeae89a92177cb1c2e96a44435821d4d65086b481 /gcm_simd.cpp
parentd451751eb269ff1345c9937107788d678c70e36f (diff)
downloadcryptopp-git-39418a85122fa7954cca6354be30a44d6335874e.tar.gz
Use PowerPC unaligned loads and stores with Power8 (GH #825, PR #826)
Use PowerPC unaligned loads and stores with Power8. Formerly we were using Power7 as the floor because the IBM POWER Architecture manuals said unaligned loads and stores were available. However, some compilers generate bad code for unaligned loads and stores using `-march=power7`, so bump to a known good.
Diffstat (limited to 'gcm_simd.cpp')
-rw-r--r--gcm_simd.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcm_simd.cpp b/gcm_simd.cpp
index b2578b37..10f2b47b 100644
--- a/gcm_simd.cpp
+++ b/gcm_simd.cpp
@@ -569,12 +569,12 @@ void GCM_ReverseHashBufferIfNeeded_CLMUL(byte *hashBuffer)
// ***************************** POWER8 ***************************** //
-#if CRYPTOPP_POWER7_AVAILABLE
-void GCM_Xor16_POWER7(byte *a, const byte *b, const byte *c)
+#if CRYPTOPP_POWER8_AVAILABLE
+void GCM_Xor16_POWER8(byte *a, const byte *b, const byte *c)
{
VecStore(VecXor(VecLoad(b), VecLoad(c)), a);
}
-#endif // CRYPTOPP_POWER7_AVAILABLE
+#endif // CRYPTOPP_POWER8_AVAILABLE
#if CRYPTOPP_POWER8_VMULL_AVAILABLE