From eff755f3da9dc32412b9aa0dc79fce0931e06117 Mon Sep 17 00:00:00 2001 From: Kostya Serebryany Date: Fri, 27 Jan 2017 00:20:55 +0000 Subject: [PATCH] [libFuzzer] make sure (again) that __builtin_popcountl is compiled into popcnt git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293237 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Fuzzer/FuzzerTracePC.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/Fuzzer/FuzzerTracePC.cpp b/lib/Fuzzer/FuzzerTracePC.cpp index 020b9b9f5959a..6c1d1ffaf7d25 100644 --- a/lib/Fuzzer/FuzzerTracePC.cpp +++ b/lib/Fuzzer/FuzzerTracePC.cpp @@ -288,6 +288,7 @@ void __sanitizer_cov_trace_pc_indir(uintptr_t Callee) { ATTRIBUTE_INTERFACE ATTRIBUTE_NO_SANITIZE_ALL +ATTRIBUTE_TARGET_POPCNT void __sanitizer_cov_trace_cmp8(uint64_t Arg1, uint64_t Arg2) { uintptr_t PC = reinterpret_cast(__builtin_return_address(0)); fuzzer::TPC.HandleCmp(PC, Arg1, Arg2); @@ -295,6 +296,7 @@ void __sanitizer_cov_trace_cmp8(uint64_t Arg1, uint64_t Arg2) { ATTRIBUTE_INTERFACE ATTRIBUTE_NO_SANITIZE_ALL +ATTRIBUTE_TARGET_POPCNT void __sanitizer_cov_trace_cmp4(uint32_t Arg1, uint32_t Arg2) { uintptr_t PC = reinterpret_cast(__builtin_return_address(0)); fuzzer::TPC.HandleCmp(PC, Arg1, Arg2); @@ -302,6 +304,7 @@ void __sanitizer_cov_trace_cmp4(uint32_t Arg1, uint32_t Arg2) { ATTRIBUTE_INTERFACE ATTRIBUTE_NO_SANITIZE_ALL +ATTRIBUTE_TARGET_POPCNT void __sanitizer_cov_trace_cmp2(uint16_t Arg1, uint16_t Arg2) { uintptr_t PC = reinterpret_cast(__builtin_return_address(0)); fuzzer::TPC.HandleCmp(PC, Arg1, Arg2); @@ -309,6 +312,7 @@ void __sanitizer_cov_trace_cmp2(uint16_t Arg1, uint16_t Arg2) { ATTRIBUTE_INTERFACE ATTRIBUTE_NO_SANITIZE_ALL +ATTRIBUTE_TARGET_POPCNT void __sanitizer_cov_trace_cmp1(uint8_t Arg1, uint8_t Arg2) { uintptr_t PC = reinterpret_cast(__builtin_return_address(0)); fuzzer::TPC.HandleCmp(PC, Arg1, Arg2); @@ -316,6 +320,7 @@ void __sanitizer_cov_trace_cmp1(uint8_t Arg1, uint8_t Arg2) { ATTRIBUTE_INTERFACE ATTRIBUTE_NO_SANITIZE_ALL +ATTRIBUTE_TARGET_POPCNT void __sanitizer_cov_trace_switch(uint64_t Val, uint64_t *Cases) { uint64_t N = Cases[0]; uint64_t ValSizeInBits = Cases[1]; @@ -342,6 +347,7 @@ void __sanitizer_cov_trace_switch(uint64_t Val, uint64_t *Cases) { ATTRIBUTE_INTERFACE ATTRIBUTE_NO_SANITIZE_ALL +ATTRIBUTE_TARGET_POPCNT void __sanitizer_cov_trace_div4(uint32_t Val) { uintptr_t PC = reinterpret_cast(__builtin_return_address(0)); fuzzer::TPC.HandleCmp(PC, Val, (uint32_t)0); @@ -349,6 +355,7 @@ void __sanitizer_cov_trace_div4(uint32_t Val) { ATTRIBUTE_INTERFACE ATTRIBUTE_NO_SANITIZE_ALL +ATTRIBUTE_TARGET_POPCNT void __sanitizer_cov_trace_div8(uint64_t Val) { uintptr_t PC = reinterpret_cast(__builtin_return_address(0)); fuzzer::TPC.HandleCmp(PC, Val, (uint64_t)0); @@ -356,6 +363,7 @@ void __sanitizer_cov_trace_div8(uint64_t Val) { ATTRIBUTE_INTERFACE ATTRIBUTE_NO_SANITIZE_ALL +ATTRIBUTE_TARGET_POPCNT void __sanitizer_cov_trace_gep(uintptr_t Idx) { uintptr_t PC = reinterpret_cast(__builtin_return_address(0)); fuzzer::TPC.HandleCmp(PC, Idx, (uintptr_t)0);