about summary refs log tree commit diff
path: root/qemu_mode/patches/afl-qemu-translate-inl.h
diff options
context:
space:
mode:
authorAndrea Fioraldi <andreafioraldi@gmail.com>2020-02-16 13:19:20 +0100
committerAndrea Fioraldi <andreafioraldi@gmail.com>2020-02-16 13:19:20 +0100
commit4bca8af499a6ecbd2c6111f4820b66c2ba4710b5 (patch)
tree34efab0aff950e1b6947131b2d7113d9555eccec /qemu_mode/patches/afl-qemu-translate-inl.h
parentbd1acfd8683b20636540a37c72867ec785a33ad1 (diff)
downloadafl++-4bca8af499a6ecbd2c6111f4820b66c2ba4710b5.tar.gz
make qemu patches more simple using helpers
Diffstat (limited to 'qemu_mode/patches/afl-qemu-translate-inl.h')
-rw-r--r--qemu_mode/patches/afl-qemu-translate-inl.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/qemu_mode/patches/afl-qemu-translate-inl.h b/qemu_mode/patches/afl-qemu-translate-inl.h
index 93a1379d..09614f5b 100644
--- a/qemu_mode/patches/afl-qemu-translate-inl.h
+++ b/qemu_mode/patches/afl-qemu-translate-inl.h
@@ -34,7 +34,7 @@
 #include "afl-qemu-common.h"
 #include "tcg-op.h"
 
-void afl_maybe_log(target_ulong cur_loc) {
+void HELPER(afl_maybe_log)(target_ulong cur_loc) {
 
   register uintptr_t afl_idx = cur_loc ^ afl_prev_loc;
 
@@ -67,7 +67,9 @@ static void afl_gen_trace(target_ulong cur_loc) {
 
   if (cur_loc >= afl_inst_rms) return;
 
-  tcg_gen_afl_maybe_log_call(cur_loc);
+  TCGv cur_loc_v = tcg_const_tl(cur_loc);
+  gen_helper_afl_maybe_log(cur_loc_v);
+  tcg_temp_free(cur_loc_v);
 
 }