diff options
author | Andrea Fioraldi <andreafioraldi@gmail.com> | 2019-10-05 00:01:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-05 00:01:16 +0200 |
commit | a8ff64f704b18567fd207fcb1e55bc5bc6f3c7c8 (patch) | |
tree | dbd1a3f85d640d223f22877456ca39a1a736b0d0 /qemu_mode/patches/afl-qemu-cpu-translate-inl.h | |
parent | 9c105098ddbb5f65a24063f08ed34d09aec36b04 (diff) | |
parent | 4cf02a32a73e799f7a9fb032854117eb0d52d496 (diff) | |
download | afl++-a8ff64f704b18567fd207fcb1e55bc5bc6f3c7c8.tar.gz |
Merge pull request #74 from vanhauser-thc/multiarch_compcov
Multiarch CompCov
Diffstat (limited to 'qemu_mode/patches/afl-qemu-cpu-translate-inl.h')
-rw-r--r-- | qemu_mode/patches/afl-qemu-cpu-translate-inl.h | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/qemu_mode/patches/afl-qemu-cpu-translate-inl.h b/qemu_mode/patches/afl-qemu-cpu-translate-inl.h index 126cf255..29cf0ab8 100644 --- a/qemu_mode/patches/afl-qemu-cpu-translate-inl.h +++ b/qemu_mode/patches/afl-qemu-cpu-translate-inl.h @@ -40,7 +40,7 @@ static void afl_compcov_log_16(target_ulong cur_loc, target_ulong arg1, register uintptr_t idx = cur_loc; - if ((arg1 & 0xff) == (arg2 & 0xff)) { INC_AFL_AREA(idx); } + if ((arg1 & 0xff00) == (arg2 & 0xff00)) { INC_AFL_AREA(idx); } } @@ -49,13 +49,13 @@ static void afl_compcov_log_32(target_ulong cur_loc, target_ulong arg1, register uintptr_t idx = cur_loc; - if ((arg1 & 0xff) == (arg2 & 0xff)) { + if ((arg1 & 0xff000000) == (arg2 & 0xff000000)) { - INC_AFL_AREA(idx); - if ((arg1 & 0xffff) == (arg2 & 0xffff)) { + INC_AFL_AREA(idx +2); + if ((arg1 & 0xff0000) == (arg2 & 0xff0000)) { INC_AFL_AREA(idx + 1); - if ((arg1 & 0xffffff) == (arg2 & 0xffffff)) { INC_AFL_AREA(idx + 2); } + if ((arg1 & 0xff00) == (arg2 & 0xff00)) { INC_AFL_AREA(idx); } } @@ -68,27 +68,27 @@ static void afl_compcov_log_64(target_ulong cur_loc, target_ulong arg1, register uintptr_t idx = cur_loc; - if ((arg1 & 0xff) == (arg2 & 0xff)) { + if ((arg1 & 0xff00000000000000) == (arg2 & 0xff00000000000000)) { - INC_AFL_AREA(idx); - if ((arg1 & 0xffff) == (arg2 & 0xffff)) { + INC_AFL_AREA(idx +6); + if ((arg1 & 0xff000000000000) == (arg2 & 0xff000000000000)) { - INC_AFL_AREA(idx + 1); - if ((arg1 & 0xffffff) == (arg2 & 0xffffff)) { + INC_AFL_AREA(idx + 5); + if ((arg1 & 0xff0000000000) == (arg2 & 0xff0000000000)) { - INC_AFL_AREA(idx + 2); - if ((arg1 & 0xffffffff) == (arg2 & 0xffffffff)) { + INC_AFL_AREA(idx + 4); + if ((arg1 & 0xff00000000) == (arg2 & 0xff00000000)) { INC_AFL_AREA(idx + 3); - if ((arg1 & 0xffffffffff) == (arg2 & 0xffffffffff)) { + if ((arg1 & 0xff000000) == (arg2 & 0xff000000)) { - INC_AFL_AREA(idx + 4); - if ((arg1 & 0xffffffffffff) == (arg2 & 0xffffffffffff)) { + INC_AFL_AREA(idx + 2); + if ((arg1 & 0xff0000) == (arg2 & 0xff0000)) { - INC_AFL_AREA(idx + 5); - if ((arg1 & 0xffffffffffffff) == (arg2 & 0xffffffffffffff)) { + INC_AFL_AREA(idx + 1); + if ((arg1 & 0xff00) == (arg2 & 0xff00)) { - INC_AFL_AREA(idx + 6); + INC_AFL_AREA(idx); } |