summaryrefslogtreecommitdiff
path: root/ppc_simd.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2020-05-10 00:44:06 -0400
committerJeffrey Walton <noloader@gmail.com>2020-05-10 00:44:06 -0400
commit7a8e241c7c0e75329793f36681894f8dab41fb37 (patch)
tree6233a9b38c99358af8e42db1fb318da259a1161a /ppc_simd.h
parent920db1ca0107a2cc02b2f21a8b6ad11ecc8e5e44 (diff)
downloadcryptopp-git-7a8e241c7c0e75329793f36681894f8dab41fb37.tar.gz
Update comments
Diffstat (limited to 'ppc_simd.h')
-rw-r--r--ppc_simd.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/ppc_simd.h b/ppc_simd.h
index 91e4b2aa..9c264fe7 100644
--- a/ppc_simd.h
+++ b/ppc_simd.h
@@ -1971,7 +1971,7 @@ inline uint32x4_p VecAdd64(const uint32x4_p& vec1, const uint32x4_p& vec2)
#else
// The carry mask selects carrys for elements 1 and 3 and sets
// remaining elements to 0. The results is then shifted so the
- // carried values are subtracted from elements 0 and 2.
+ // carried values are added to elements 0 and 2.
#if defined(CRYPTOPP_BIG_ENDIAN)
const uint32x4_p zero = {0, 0, 0, 0};
const uint32x4_p mask = {0, 1, 0, 1};
@@ -1980,8 +1980,6 @@ inline uint32x4_p VecAdd64(const uint32x4_p& vec1, const uint32x4_p& vec2)
const uint32x4_p mask = {1, 0, 1, 0};
#endif
- // subc sets the compliment of borrow, so we have to un-compliment it
- // using andc.
uint32x4_p cy = vec_addc(vec1, vec2);
uint32x4_p res = vec_add(vec1, vec2);
cy = vec_and(mask, cy);