VirtualBox

Changeset 36171 in vbox for trunk/src/recompiler


Ignore:
Timestamp:
Mar 4, 2011 1:25:06 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
70362
Message:

rem: Merged in changes from the branches/stable_0_10 (r7249).

Location:
trunk/src/recompiler
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/recompiler/cpu-defs.h

    r36170 r36171  
    187187    uint32_t halted; /* Nonzero if the CPU is in suspend state */       \
    188188    uint32_t interrupt_request;                                         \
     189    volatile /*sig_atomic_t - vbox*/ int32_t exit_request;                                 \
    189190    /* The meaning of the MMU modes is defined in the target code. */   \
    190191    CPUTLBEntry tlb_table[NB_MMU_MODES][CPU_TLB_SIZE];                  \
  • trunk/src/recompiler/cpu-exec.c

    r36170 r36171  
    404404                    }
    405405                }
     406                if (unlikely(env->exit_request)) {
     407                    env->exit_request = 0;
     408                    env->exception_index = EXCP_INTERRUPT;
     409                    cpu_loop_exit();
     410                }
    406411
    407412                /*
     
    451456                   infinite loop and becomes env->current_tb. Avoid
    452457                   starting execution if there is a pending interrupt. */
    453                 if (unlikely (env->interrupt_request & CPU_INTERRUPT_EXIT))
     458                if (unlikely (env->exit_request))
    454459                    env->current_tb = NULL;
    455460
     
    639644            }
    640645#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) {
    642647                int ret;
    643648                env->eflags = env->eflags | helper_cc_compute_all(CC_OP) | (DF & DF_MASK);
     
    654659                    /* softmmu execution needed */
    655660                } else {
    656                     if (env->interrupt_request != 0) {
     661                    if (env->interrupt_request != 0 || env->exit_request != 0) {
    657662                        /* hardware interrupt will be executed just after */
    658663                    } else {
     
    853858                        next_tb = 0;
    854859                    }
    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();
    860865                }
    861866#ifdef DEBUG_EXEC
     
    927932                   infinite loop and becomes env->current_tb. Avoid
    928933                   starting execution if there is a pending interrupt. */
    929                 if (unlikely (env->interrupt_request & CPU_INTERRUPT_EXIT))
     934                if (unlikely (env->exit_request))
    930935                    env->current_tb = NULL;
    931936
  • trunk/src/recompiler/exec.c

    r36170 r36171  
    669669    qemu_get_be32s(f, &env->halted);
    670670    qemu_get_be32s(f, &env->interrupt_request);
     671    env->interrupt_request &= ~CPU_INTERRUPT_EXIT;
    671672    tlb_flush(env, 1);
    672673
     
    17351736    int old_mask;
    17361737
     1738    if (mask & CPU_INTERRUPT_EXIT) {
     1739        env->exit_request = 1;
     1740        mask &= ~CPU_INTERRUPT_EXIT;
     1741    }
     1742
    17371743    old_mask = env->interrupt_request;
    17381744#ifdef VBOX
     
    17531759        env->icount_decr.u16.high = 0xffff;
    17541760#ifndef CONFIG_USER_ONLY
    1755         /* CPU_INTERRUPT_EXIT isn't a real interrupt.  It just means
    1756            an async event happened and we need to process it.  */
    17571761        if (!can_do_io(env)
    1758             && (mask & ~(old_mask | CPU_INTERRUPT_EXIT)) != 0) {
     1762            && (mask & ~old_mask) != 0) {
    17591763            cpu_abort(env, "Raised interrupt while not in I/O function");
    17601764        }
  • trunk/src/recompiler/osdep.h

    r36170 r36171  
    7171#include <sys/types.h>
    7272#include <sys/signal.h>
     73#endif
     74
     75#ifndef _WIN32
     76#include <sys/time.h>
    7377#endif
    7478
  • trunk/src/recompiler/target-i386/helper.c

    r36170 r36171  
    14551455    asm volatile("pusha \n\t"
    14561456                 "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"
    14611461                 "popa"
    14621462                 : : "a"(function), "c"(count), "S"(vec)
  • trunk/src/recompiler/target-i386/op_helper.c

    r36170 r36171  
    38353835    selector = selector1 & 0xffff;
    38363836    eflags = helper_cc_compute_all(CC_OP);
     3837    if ((selector & 0xfffc) == 0)
     3838        goto fail;
    38373839    if (load_segment(&e1, &e2, selector) != 0)
    38383840        goto fail;
  • trunk/src/recompiler/target-i386/translate.c

    r36170 r36171  
    28252825        gen_helper_debug();
    28262826    } else if (s->tf) {
    2827         gen_helper_single_step();
     2827        gen_helper_single_step();
    28282828    } else {
    28292829        tcg_gen_exit_tb(0);
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette