Changeset 36171 in vbox for trunk/src/recompiler
- Timestamp:
- Mar 4, 2011 1:25:06 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 70362
- Location:
- trunk/src/recompiler
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/recompiler/cpu-defs.h
r36170 r36171 187 187 uint32_t halted; /* Nonzero if the CPU is in suspend state */ \ 188 188 uint32_t interrupt_request; \ 189 volatile /*sig_atomic_t - vbox*/ int32_t exit_request; \ 189 190 /* The meaning of the MMU modes is defined in the target code. */ \ 190 191 CPUTLBEntry tlb_table[NB_MMU_MODES][CPU_TLB_SIZE]; \ -
trunk/src/recompiler/cpu-exec.c
r36170 r36171 404 404 } 405 405 } 406 if (unlikely(env->exit_request)) { 407 env->exit_request = 0; 408 env->exception_index = EXCP_INTERRUPT; 409 cpu_loop_exit(); 410 } 406 411 407 412 /* … … 451 456 infinite loop and becomes env->current_tb. Avoid 452 457 starting execution if there is a pending interrupt. */ 453 if (unlikely (env-> interrupt_request & CPU_INTERRUPT_EXIT))458 if (unlikely (env->exit_request)) 454 459 env->current_tb = NULL; 455 460 … … 639 644 } 640 645 #ifdef USE_KQEMU 641 if (kqemu_is_ok(env) && env->interrupt_request == 0 ) {646 if (kqemu_is_ok(env) && env->interrupt_request == 0 && env->exit_request == 0) { 642 647 int ret; 643 648 env->eflags = env->eflags | helper_cc_compute_all(CC_OP) | (DF & DF_MASK); … … 654 659 /* softmmu execution needed */ 655 660 } else { 656 if (env->interrupt_request != 0 ) {661 if (env->interrupt_request != 0 || env->exit_request != 0) { 657 662 /* hardware interrupt will be executed just after */ 658 663 } else { … … 853 858 next_tb = 0; 854 859 } 855 if (interrupt_request & CPU_INTERRUPT_EXIT) {856 env->interrupt_request &= ~CPU_INTERRUPT_EXIT;857 env->exception_index = EXCP_INTERRUPT;858 cpu_loop_exit();859 }860 } 861 if (unlikely(env->exit_request)) { 862 env->exit_request = 0; 863 env->exception_index = EXCP_INTERRUPT; 864 cpu_loop_exit(); 860 865 } 861 866 #ifdef DEBUG_EXEC … … 927 932 infinite loop and becomes env->current_tb. Avoid 928 933 starting execution if there is a pending interrupt. */ 929 if (unlikely (env-> interrupt_request & CPU_INTERRUPT_EXIT))934 if (unlikely (env->exit_request)) 930 935 env->current_tb = NULL; 931 936 -
trunk/src/recompiler/exec.c
r36170 r36171 669 669 qemu_get_be32s(f, &env->halted); 670 670 qemu_get_be32s(f, &env->interrupt_request); 671 env->interrupt_request &= ~CPU_INTERRUPT_EXIT; 671 672 tlb_flush(env, 1); 672 673 … … 1735 1736 int old_mask; 1736 1737 1738 if (mask & CPU_INTERRUPT_EXIT) { 1739 env->exit_request = 1; 1740 mask &= ~CPU_INTERRUPT_EXIT; 1741 } 1742 1737 1743 old_mask = env->interrupt_request; 1738 1744 #ifdef VBOX … … 1753 1759 env->icount_decr.u16.high = 0xffff; 1754 1760 #ifndef CONFIG_USER_ONLY 1755 /* CPU_INTERRUPT_EXIT isn't a real interrupt. It just means1756 an async event happened and we need to process it. */1757 1761 if (!can_do_io(env) 1758 && (mask & ~ (old_mask | CPU_INTERRUPT_EXIT)) != 0) {1762 && (mask & ~old_mask) != 0) { 1759 1763 cpu_abort(env, "Raised interrupt while not in I/O function"); 1760 1764 } -
trunk/src/recompiler/osdep.h
r36170 r36171 71 71 #include <sys/types.h> 72 72 #include <sys/signal.h> 73 #endif 74 75 #ifndef _WIN32 76 #include <sys/time.h> 73 77 #endif 74 78 -
trunk/src/recompiler/target-i386/helper.c
r36170 r36171 1455 1455 asm volatile("pusha \n\t" 1456 1456 "cpuid \n\t" 1457 "mov %%eax, 0(% 1) \n\t"1458 "mov %%ebx, 4(% 1) \n\t"1459 "mov %%ecx, 8(% 1) \n\t"1460 "mov %%edx, 12(% 1) \n\t"1457 "mov %%eax, 0(%2) \n\t" 1458 "mov %%ebx, 4(%2) \n\t" 1459 "mov %%ecx, 8(%2) \n\t" 1460 "mov %%edx, 12(%2) \n\t" 1461 1461 "popa" 1462 1462 : : "a"(function), "c"(count), "S"(vec) -
trunk/src/recompiler/target-i386/op_helper.c
r36170 r36171 3835 3835 selector = selector1 & 0xffff; 3836 3836 eflags = helper_cc_compute_all(CC_OP); 3837 if ((selector & 0xfffc) == 0) 3838 goto fail; 3837 3839 if (load_segment(&e1, &e2, selector) != 0) 3838 3840 goto fail; -
trunk/src/recompiler/target-i386/translate.c
r36170 r36171 2825 2825 gen_helper_debug(); 2826 2826 } else if (s->tf) { 2827 2827 gen_helper_single_step(); 2828 2828 } else { 2829 2829 tcg_gen_exit_tb(0);
Note:
See TracChangeset
for help on using the changeset viewer.