about summary refs log tree commit diff
path: root/instrumentation/llvm-ngram-coverage.h
diff options
context:
space:
mode:
authorEdznux <edznux@gmail.com>2020-10-04 16:03:15 +0200
committerEdznux <edznux@gmail.com>2020-10-04 16:03:15 +0200
commit1e0bc2e5c3fff506bc8bdba9ba96530975c730f1 (patch)
tree6cfe62b78d6d91482a1f4c240246e14458735856 /instrumentation/llvm-ngram-coverage.h
parentb0de6fed11d4a8de8f016f1d8db0cb19a6b96eb2 (diff)
parent44c0dc6d961853806a07fa05b948686392ea93fc (diff)
downloadafl++-1e0bc2e5c3fff506bc8bdba9ba96530975c730f1.tar.gz
Merge remote-tracking branch 'origin/dev' into statsd_implem
Diffstat (limited to 'instrumentation/llvm-ngram-coverage.h')
-rw-r--r--instrumentation/llvm-ngram-coverage.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/instrumentation/llvm-ngram-coverage.h b/instrumentation/llvm-ngram-coverage.h
new file mode 100644
index 00000000..12b666e9
--- /dev/null
+++ b/instrumentation/llvm-ngram-coverage.h
@@ -0,0 +1,18 @@
+#ifndef AFL_NGRAM_CONFIG_H
+#define AFL_NGRAM_CONFIG_H
+
+#include "../config.h"
+
+#if (MAP_SIZE_POW2 <= 16)
+typedef u16 PREV_LOC_T;
+#elif (MAP_SIZE_POW2 <= 32)
+typedef u32 PREV_LOC_T;
+#else
+typedef u64 PREV_LOC_T;
+#endif
+
+/* Maximum ngram size */
+#define NGRAM_SIZE_MAX 16U
+
+#endif
+