cmplog runtime for LLVM

This commit is contained in:
Andrea Fioraldi
2020-01-30 22:40:09 +01:00
parent b8bad5a227
commit 95a98fb3e8
13 changed files with 1377 additions and 517 deletions

View File

@ -78,6 +78,20 @@ typedef int64_t s64;
\
})
#define SWAP64(_x) \
({ \
\
u64 _ret = (_x); \
_ret = \
(_ret & 0x00000000FFFFFFFF) << 32 | (_ret & 0xFFFFFFFF00000000) >> 32; \
_ret = \
(_ret & 0x0000FFFF0000FFFF) << 16 | (_ret & 0xFFFF0000FFFF0000) >> 16; \
_ret = \
(_ret & 0x00FF00FF00FF00FF) << 8 | (_ret & 0xFF00FF00FF00FF00) >> 8; \
_ret; \
\
})
#ifdef AFL_LLVM_PASS
#if defined(__linux__)
#define AFL_SR(s) (srandom(s))