try macos fix

This commit is contained in:
vanhauser-thc
2025-02-12 09:15:55 +01:00
parent a441f517e7
commit 47954cd04c
3 changed files with 63 additions and 44 deletions

View File

@ -1,12 +1,19 @@
#ifndef _COVERAGE_H
#define _COVERAGE_H
#include "config.h"
#include "types.h"
#define _AFL_INTSIZEVAR u64
#if (defined(__AVX512F__) && defined(__AVX512DQ__)) || defined(__AVX2__)
#include <immintrin.h>
#endif
u32 skim(const u64 *virgin, const u64 *current, const u64 *current_end);
u64 classify_word(u64 word);
u32 skim(const u64 *virgin, const u64 *current, const u64 *current_end);
u64 classify_word(u64 word);
void classify_counts_mem(u64 *mem, u32 size);
inline u64 classify_word(u64 word) {
@ -134,7 +141,7 @@ inline u32 skim(const u64 *virgin, const u64 *current, const u64 *current_end) {
/* All bytes are zero. */
if (likely(mask == 0xff)) continue;
/* Look for nonzero bytes and check for new bits. */
/* Look for nonzero bytes and check for new bits. */
#define UNROLL(x) \
if (unlikely(!(mask & (1 << x)) && classify_word(current[x]) & virgin[x])) \
return 1
@ -208,3 +215,5 @@ inline u32 skim(const u64 *virgin, const u64 *current, const u64 *current_end) {
#endif
#endif