about summary refs log tree commit diff
path: root/qemu_mode/patches
diff options
context:
space:
mode:
authorAndrea Fioraldi <andreafioraldi@gmail.com>2020-02-08 12:14:00 +0100
committerAndrea Fioraldi <andreafioraldi@gmail.com>2020-02-08 12:14:00 +0100
commit0403f008e3c68a9b212d38a5fc0de79eb2f40895 (patch)
tree9db270227f37b1fc8130927eac26b0420ef711ba /qemu_mode/patches
parent96b378d5ba9b057bd9a78f37b7817e335242c4a5 (diff)
downloadafl++-0403f008e3c68a9b212d38a5fc0de79eb2f40895.tar.gz
solve small error on building new qemu patches for not x86 targets
Diffstat (limited to 'qemu_mode/patches')
-rw-r--r--qemu_mode/patches/afl-qemu-cpu-translate-inl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/qemu_mode/patches/afl-qemu-cpu-translate-inl.h b/qemu_mode/patches/afl-qemu-cpu-translate-inl.h
index 3c230c30..06e73831 100644
--- a/qemu_mode/patches/afl-qemu-cpu-translate-inl.h
+++ b/qemu_mode/patches/afl-qemu-cpu-translate-inl.h
@@ -274,7 +274,7 @@ static void i386_restore_state_for_persistent(TCGv *cpu_regs) {
     tcg_gen_brcond_tl(TCG_COND_NE, first_pass, one, lbl_restore_gpr);
 
     // save GRP registers
-    for (i = 0; i < CPU_NB_REGS; ++i) {
+    for (i = 0; i < AFL_REGS_NUM; ++i) {
 
       gpr_sv = tcg_const_ptr(&persistent_saved_gpr[i]);
       tcg_gen_st_tl(cpu_regs[i], gpr_sv, 0);
@@ -288,7 +288,7 @@ static void i386_restore_state_for_persistent(TCGv *cpu_regs) {
     if (afl_persistent_hook_ptr) tcg_gen_afl_call0(callback_to_persistent_hook);
 
     // restore GRP registers
-    for (i = 0; i < CPU_NB_REGS; ++i) {
+    for (i = 0; i < AFL_REGS_NUM; ++i) {
 
       gpr_sv = tcg_const_ptr(&persistent_saved_gpr[i]);
       tcg_gen_ld_tl(cpu_regs[i], gpr_sv, 0);