]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Tweak grammar
authorJoel Rosdahl <joel@rosdahl.net>
Wed, 23 Oct 2019 19:02:03 +0000 (21:02 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Wed, 23 Oct 2019 19:02:03 +0000 (21:02 +0200)
src/hashutil.cpp

index 6b3b62f5cebdb8424af53b1ee3762c0df9216ea8..591965d0284a1c55d26050f354831d374a959906 100644 (file)
 
 #include "third_party/xxhash.h"
 
-// With older GCC (libgcc), __builtin_cpu_supports("avx2) would return true if
-// AVX2 was supported by the CPU but disabled by the OS. This was fixed in GCC
-// 8, 7.4 and 6.5 (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85100).
+// With older GCC (libgcc), __builtin_cpu_supports("avx2) returns true if AVX2
+// is supported by the CPU but disabled by the OS. This was fixed in GCC 8, 7.4
+// and 6.5 (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85100).
 //
-// For clang it seems to be correct if compiler-rt is used as -rtlib, at least
+// For Clang it seems to be correct if compiler-rt is used as -rtlib, at least
 // as of 3.9 (see https://bugs.llvm.org/show_bug.cgi?id=25510). But if libgcc
-// is used we have the same problem as above. Unfortunately there doesn't seem
-// to be a way to detect which one is used, or the version of libgcc when used
-// by clang. So assume that it works with clang >= 3.9.
+// is used we have the same problem as mentioned above. Unfortunately there
+// doesn't seem to be a way to detect which one is used, or the version of
+// libgcc when used by clang, so assume that it works with Clang >= 3.9.
 #if !(__GNUC__ >= 8 || (__GNUC__ == 7 && __GNUC_MINOR__ >= 4)                  \
       || (__GNUC__ == 6 && __GNUC_MINOR__ >= 5) || __clang_major__ > 3         \
       || (__clang_major__ == 3 && __clang_minor__ >= 9))
@@ -88,7 +88,8 @@ static int check_for_temporal_macros_avx2(const char* str, size_t len)
   __attribute__((target("avx2")));
 
 // The following algorithm, which uses AVX2 instructions to find __DATE__ and
-// __TIME__, is heavily inspired by http://0x80.pl/articles/simd-strfind.html
+// __TIME__, is heavily inspired by
+// <http://0x80.pl/articles/simd-strfind.html>.
 static int
 check_for_temporal_macros_avx2(const char* str, size_t len)
 {
@@ -112,11 +113,11 @@ check_for_temporal_macros_avx2(const char* str, size_t len)
     const __m256i eq_first = _mm256_cmpeq_epi8(first, block_first);
     const __m256i eq_last = _mm256_cmpeq_epi8(last, block_last);
 
-    // Set bit i in mask if byte i in both eq_first and eq_last have most
+    // Set bit i in mask if byte i in both eq_first and eq_last has the most
     // significant bit set.
     uint32_t mask = _mm256_movemask_epi8(_mm256_and_si256(eq_first, eq_last));
 
-    // A bit set in mask now indicate a possible location for a temporal macro.
+    // A bit set in mask now indicates a possible location for a temporal macro.
     while (mask != 0) {
       // The start position + 1 (as we know the first char is _).
       const auto start = pos + __builtin_ctz(mask) + 1;