From 0403f008e3c68a9b212d38a5fc0de79eb2f40895 Mon Sep 17 00:00:00 2001 From: Andrea Fioraldi Date: Sat, 8 Feb 2020 12:14:00 +0100 Subject: solve small error on building new qemu patches for not x86 targets --- qemu_mode/patches/afl-qemu-cpu-translate-inl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'qemu_mode/patches/afl-qemu-cpu-translate-inl.h') 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); -- cgit 1.4.1