[PATCH] D71223: [scudo][standalone] Define hasHardwareCRC32 for other archs
Kostya Kortchinsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 9 13:12:06 PST 2019
cryptoad created this revision.
cryptoad added reviewers: hctim, pcc, cferris, eugenis, vitalybuka.
Herald added subscribers: Sanitizers, kristof.beyls.
Herald added projects: Sanitizers, LLVM.
The function was only defined for x86 and arm families, which ends
up being an issue for PPC in g3.
Define the function, simply returning `false` for "other"
architectures.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D71223
Files:
compiler-rt/lib/scudo/standalone/checksum.cpp
Index: compiler-rt/lib/scudo/standalone/checksum.cpp
===================================================================
--- compiler-rt/lib/scudo/standalone/checksum.cpp
+++ compiler-rt/lib/scudo/standalone/checksum.cpp
@@ -44,7 +44,6 @@
__get_cpuid(1, &Eax, &Ebx, &Ecx, &Edx);
return !!(Ecx & bit_SSE4_2);
}
-
#elif defined(__arm__) || defined(__aarch64__)
#ifndef AT_HWCAP
#define AT_HWCAP 16
@@ -65,6 +64,9 @@
return !!(getauxval(AT_HWCAP) & HWCAP_CRC32);
#endif // SCUDO_FUCHSIA
}
+#else
+// No hardware CRC32 implemented in Scudo for other architectures.
+bool hasHardwareCRC32() { return false; }
#endif // defined(__x86_64__) || defined(__i386__)
} // namespace scudo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71223.232920.patch
Type: text/x-patch
Size: 695 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191209/25d2af00/attachment.bin>
More information about the llvm-commits
mailing list