diff --git a/qemu/target-i386/unicorn.c b/qemu/target-i386/unicorn.c index b7c62e30..2280d564 100644 --- a/qemu/target-i386/unicorn.c +++ b/qemu/target-i386/unicorn.c @@ -132,12 +132,12 @@ void x86_reg_reset(struct uc_struct *uc) break; case UC_MODE_32: env->hflags |= HF_CS32_MASK | HF_SS32_MASK | HF_OSFXSR_MASK; - env->cr[0] = CR0_PE_MASK; // protected mode + cpu_x86_update_cr0(env, CR0_PE_MASK); // protected mode break; case UC_MODE_64: env->hflags |= HF_CS32_MASK | HF_SS32_MASK | HF_CS64_MASK | HF_LMA_MASK | HF_OSFXSR_MASK; env->hflags &= ~(HF_ADDSEG_MASK); - env->cr[0] = CR0_PE_MASK; // protected mode + cpu_x86_update_cr0(env, CR0_PE_MASK); // protected mode break; } }