-extern FILE *logfile, *stdout, *stderr;
-void exit (int);
-void abort (void);
-
-void cpu_loop_exit(void)
-{
- longjmp(env->jmp_env, 1);
-}
-
-void do_process_exceptions (void)
-{
- cpu_loop_exit();
-}
-
-int check_exception_state (CPUState *env)
-{
- int i;
-
- /* Process PPC exceptions */
- for (i = 1; i < EXCP_PPC_MAX; i++) {
- if (env->exceptions & (1 << i)) {
- switch (i) {
- case EXCP_EXTERNAL:
- case EXCP_DECR:
- if (msr_ee == 0)
- return 0;
- break;
- case EXCP_PROGRAM:
- if (env->errors[EXCP_PROGRAM] == EXCP_FP &&
- msr_fe0 == 0 && msr_fe1 == 0)
- return 0;
- break;
- default:
- break;
- }
- env->exception_index = i;
- env->error_code = env->errors[i];
- return 1;
- }
- }
-
- return 0;
-}
-