245 |
(unsigned long)env->segs[R_SS].base) != 0) << |
(unsigned long)env->segs[R_SS].base) != 0) << |
246 |
GEN_FLAG_ADDSEG_SHIFT; |
GEN_FLAG_ADDSEG_SHIFT; |
247 |
flags |= env->cpl << GEN_FLAG_CPL_SHIFT; |
flags |= env->cpl << GEN_FLAG_CPL_SHIFT; |
248 |
|
flags |= env->soft_mmu << GEN_FLAG_SOFT_MMU_SHIFT; |
249 |
flags |= (env->eflags & VM_MASK) >> (17 - GEN_FLAG_VM_SHIFT); |
flags |= (env->eflags & VM_MASK) >> (17 - GEN_FLAG_VM_SHIFT); |
250 |
flags |= (env->eflags & (IOPL_MASK | TF_MASK)); |
flags |= (env->eflags & (IOPL_MASK | TF_MASK)); |
251 |
cs_base = env->segs[R_CS].base; |
cs_base = env->segs[R_CS].base; |
334 |
gen_func(); |
gen_func(); |
335 |
#endif |
#endif |
336 |
env->current_tb = NULL; |
env->current_tb = NULL; |
337 |
|
/* reset soft MMU for next block (it can currently |
338 |
|
only be set by a memory fault) */ |
339 |
|
#if defined(TARGET_I386) && !defined(CONFIG_SOFTMMU) |
340 |
|
if (env->soft_mmu) { |
341 |
|
env->soft_mmu = 0; |
342 |
|
/* do not allow linking to another block */ |
343 |
|
T0 = 0; |
344 |
|
} |
345 |
|
#endif |
346 |
} |
} |
347 |
} else { |
} else { |
348 |
} |
} |
488 |
a virtual CPU fault */ |
a virtual CPU fault */ |
489 |
cpu_restore_state(tb, env, pc); |
cpu_restore_state(tb, env, pc); |
490 |
} |
} |
491 |
|
if (ret == 1) { |
492 |
#if 0 |
#if 0 |
493 |
printf("PF exception: EIP=0x%08x CR2=0x%08x error=0x%x\n", |
printf("PF exception: EIP=0x%08x CR2=0x%08x error=0x%x\n", |
494 |
env->eip, env->cr[2], env->error_code); |
env->eip, env->cr[2], env->error_code); |
495 |
#endif |
#endif |
496 |
/* we restore the process signal mask as the sigreturn should |
/* we restore the process signal mask as the sigreturn should |
497 |
do it (XXX: use sigsetjmp) */ |
do it (XXX: use sigsetjmp) */ |
498 |
sigprocmask(SIG_SETMASK, old_set, NULL); |
sigprocmask(SIG_SETMASK, old_set, NULL); |
499 |
raise_exception_err(EXCP0E_PAGE, env->error_code); |
raise_exception_err(EXCP0E_PAGE, env->error_code); |
500 |
|
} else { |
501 |
|
/* activate soft MMU for this block */ |
502 |
|
env->soft_mmu = 1; |
503 |
|
sigprocmask(SIG_SETMASK, old_set, NULL); |
504 |
|
cpu_loop_exit(); |
505 |
|
} |
506 |
/* never comes here */ |
/* never comes here */ |
507 |
return 1; |
return 1; |
508 |
} |
} |