- for(;;) {
- /* prepare setjmp context for exception handling */
- if (sigsetjmp(cpu->jmp_env, 0) == 0) {
- TranslationBlock *tb, *last_tb = NULL;
- int tb_exit = 0;
-
- /* if an exception is pending, we execute it here */
- if (cpu_handle_exception(cpu, &ret)) {
- break;
- }
-
- for(;;) {
- cpu_handle_interrupt(cpu, &last_tb);
- tb = tb_find(cpu, last_tb, tb_exit);
- cpu_loop_exec_tb(cpu, tb, &last_tb, &tb_exit, &sc);
- /* Try to align the host and virtual clocks
- if the guest is in advance */
- align_clocks(&sc, cpu);
- } /* for(;;) */
- } else {
+ /* prepare setjmp context for exception handling */
+ if (sigsetjmp(cpu->jmp_env, 0) != 0) {