mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-04 10:04:33 +00:00
[libFuzzer] speculatively trying to fix the Mac build; second attempt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285262 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
eb87cccbef
commit
56a90b623f
@ -262,7 +262,10 @@ void TracePC::HandleCmp(void *PC, T Arg1, T Arg2) {
|
||||
uint64_t ArgXor = Arg1 ^ Arg2;
|
||||
uint64_t ArgDistance = __builtin_popcountl(ArgXor) + 1; // [1,65]
|
||||
uintptr_t Idx = ((PCuint & 4095) + 1) * ArgDistance;
|
||||
TORCInsert(ArgXor, Arg1, Arg2);
|
||||
if (sizeof(T) == 4)
|
||||
TORC4.Insert(ArgXor, Arg1, Arg2);
|
||||
else if (sizeof(T) == 8)
|
||||
TORC8.Insert(ArgXor, Arg1, Arg2);
|
||||
HandleValueProfile(Idx);
|
||||
}
|
||||
|
||||
|
@ -107,19 +107,6 @@ private:
|
||||
static const size_t kNumCounters = 1 << 14;
|
||||
alignas(8) uint8_t Counters[kNumCounters];
|
||||
|
||||
void TORCInsert(size_t Idx, uint8_t Arg1, uint8_t Arg2) {
|
||||
// Do nothing, too small to be interesting.
|
||||
}
|
||||
void TORCInsert(size_t Idx, uint16_t Arg1, uint16_t Arg2) {
|
||||
// Do nothing, these don't usually hapen.
|
||||
}
|
||||
void TORCInsert(size_t Idx, uint32_t Arg1, uint32_t Arg2) {
|
||||
TORC4.Insert(Idx, Arg1, Arg2);
|
||||
}
|
||||
void TORCInsert(size_t Idx, uint64_t Arg1, uint64_t Arg2) {
|
||||
TORC8.Insert(Idx, Arg1, Arg2);
|
||||
}
|
||||
|
||||
static const size_t kNumPCs = 1 << 24;
|
||||
uintptr_t PCs[kNumPCs];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user