diff options
author | Andrea Fioraldi <andreafioraldi@gmail.com> | 2019-08-29 15:28:42 +0200 |
---|---|---|
committer | Andrea Fioraldi <andreafioraldi@gmail.com> | 2019-08-29 15:28:42 +0200 |
commit | 132ad08885f95abfdcbafdf1fa33b3f12ac59538 (patch) | |
tree | 8521adae2d253807dd6799138425763dd6d30a41 /qemu_mode/patches/afl-qemu-translate-inl.h | |
parent | d3e173b6e6baf6e920e002b657808eab24669058 (diff) | |
download | afl++-132ad08885f95abfdcbafdf1fa33b3f12ac59538.tar.gz |
common header for qemu and unicorn
Diffstat (limited to 'qemu_mode/patches/afl-qemu-translate-inl.h')
-rw-r--r-- | qemu_mode/patches/afl-qemu-translate-inl.h | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/qemu_mode/patches/afl-qemu-translate-inl.h b/qemu_mode/patches/afl-qemu-translate-inl.h index a33e17b7..d63c5167 100644 --- a/qemu_mode/patches/afl-qemu-translate-inl.h +++ b/qemu_mode/patches/afl-qemu-translate-inl.h @@ -32,7 +32,7 @@ */ -#include "../../config.h" +#include "afl-qemu-common.h" #include "tcg-op.h" /* Declared in afl-qemu-cpu-inl.h */ @@ -48,17 +48,7 @@ void afl_maybe_log(target_ulong cur_loc) { register uintptr_t afl_idx = cur_loc ^ prev_loc; -#if (defined(__x86_64__) || defined(__i386__)) && defined(AFL_QEMU_NOT_ZERO) - asm volatile ( - "incb (%0, %1, 1)\n" - "adcb $0, (%0, %1, 1)\n" - : /* no out */ - : "r" (afl_area_ptr), "r" (afl_idx) - : "memory", "eax" - ); -#else - afl_area_ptr[afl_idx]++; -#endif + INC_AFL_AREA(afl_idx); prev_loc = cur_loc >> 1; |