summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Fuzzer/FuzzerInternal.h
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2016-08-24 01:38:42 +0000
committerKostya Serebryany <kcc@google.com>2016-08-24 01:38:42 +0000
commitbceadcf1cd8f8128c92b1b2f3d4a11ba85f480cb (patch)
tree0d8252aa65c0c27c5490417ed841fb2d838a3b2f /llvm/lib/Fuzzer/FuzzerInternal.h
parent79f85b3b8ff8e54e9c94870477f2868929e481b7 (diff)
downloadbcm5719-llvm-bceadcf1cd8f8128c92b1b2f3d4a11ba85f480cb.tar.gz
bcm5719-llvm-bceadcf1cd8f8128c92b1b2f3d4a11ba85f480cb.zip
[libFuzzer] use __attribute__((target("popcnt"))) only on x86_64
llvm-svn: 279601
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerInternal.h')
-rw-r--r--llvm/lib/Fuzzer/FuzzerInternal.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerInternal.h b/llvm/lib/Fuzzer/FuzzerInternal.h
index 0212f94fa3b..c7382c9cd6c 100644
--- a/llvm/lib/Fuzzer/FuzzerInternal.h
+++ b/llvm/lib/Fuzzer/FuzzerInternal.h
@@ -26,10 +26,6 @@
#include <unordered_set>
#include <vector>
-#include "FuzzerExtFunctions.h"
-#include "FuzzerInterface.h"
-#include "FuzzerValueBitMap.h"
-
// Platform detection.
#ifdef __linux__
#define LIBFUZZER_LINUX 1
@@ -41,6 +37,16 @@
#error "Support for your platform has not been implemented"
#endif
+#ifdef __x86_64
+#define ATTRIBUTE_TARGET_POPCNT __attribute__((target("popcnt")))
+#else
+#define ATTRIBUTE_TARGET_POPCNT
+#endif
+
+#include "FuzzerExtFunctions.h"
+#include "FuzzerInterface.h"
+#include "FuzzerValueBitMap.h"
+
namespace fuzzer {
typedef int (*UserCallback)(const uint8_t *Data, size_t Size);
OpenPOWER on IntegriCloud