VirtualBox

Changeset 13569 in vbox


Ignore:
Timestamp:
Oct 26, 2008 9:46:20 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
38445
Message:

New recompiler successfully boots 32 and 64 guests on 64-bit Linux.

Location:
trunk/src/recompiler_new
Files:
6 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/recompiler_new/cpu-exec.c

    r13440 r13569  
    263263    unsigned long next_tb;
    264264
     265#ifndef VBOX
    265266    if (cpu_halted(env1) == EXCP_HALTED)
    266267        return EXCP_HALTED;
     268#endif
    267269
    268270    cpu_single_env = env1;
  • trunk/src/recompiler_new/target-i386/translate.c

    r13559 r13569  
    827827static void gen_check_external_event()
    828828{
     829#if 0
     830    /** @todo: nike make it work */
     831    /* This code is more effective, but for whatever reason TCG fails to compile it */
    829832    int skip_label;
     833    TCGv t0;
    830834   
    831835    skip_label = gen_new_label();
    832     tcg_gen_ld32u_tl(cpu_tmp0, cpu_env, offsetof(CPUState, interrupt_request));
     836    t0 = tcg_temp_local_new(TCG_TYPE_TL);
     837    /* t0 = cpu_tmp0; */
     838
     839    tcg_gen_ld32u_tl(t0, cpu_env, offsetof(CPUState, interrupt_request));
    833840    /* Keep in sync with helper_check_external_event() */
    834     tcg_gen_andi_tl(cpu_tmp0, cpu_tmp0,
     841    tcg_gen_andi_tl(t0, t0,
    835842                    CPU_INTERRUPT_EXTERNAL_EXIT
    836843                    | CPU_INTERRUPT_EXTERNAL_TIMER
    837844                    | CPU_INTERRUPT_EXTERNAL_DMA
    838845                    | CPU_INTERRUPT_EXTERNAL_HARD);
    839     tcg_gen_brcondi_tl(TCG_COND_EQ, cpu_tmp0, 0, skip_label);
     846    tcg_gen_brcond_i32(TCG_COND_EQ, t0, 0, skip_label);
     847    tcg_temp_free(t0);
    840848
    841849    tcg_gen_helper_0_0(helper_check_external_event);
    842850
    843851   gen_set_label(skip_label);
     852#else
     853    tcg_gen_helper_0_0(helper_check_external_event);
     854#endif
    844855}
    845856
     
    79127923            tcg_gen_andi_tl(cpu_tmp0, cpu_cc_src, CC_Z);
    79137924            label1 = gen_new_label();
    7914             tcg_gen_brcondi_tl(TCG_COND_EQ, cpu_tmp0, 0, label1);
     7925            tcg_gen_brcond_i32(TCG_COND_EQ, cpu_tmp0, 0, label1);
    79157926            gen_op_mov_reg_v(ot, reg, t0);
    79167927            gen_set_label(label1);
     
    82428253    dc->f_st = 0;
    82438254    dc->vm86 = (flags >> VM_SHIFT) & 1;
     8255#ifdef VBOX_WITH_CALL_RECORD
     8256    dc->vme = !!(env->cr[4] & CR4_VME_MASK);
     8257    if (    !(env->state & CPU_RAW_RING0)
     8258        &&  (env->cr[0] & CR0_PG_MASK)
     8259        &&  !(env->eflags & X86_EFL_IF)
     8260        &&  dc->code32)
     8261        dc->record_call = 1;
     8262    else
     8263        dc->record_call = 0;
     8264#endif
    82448265    dc->cpl = (flags >> HF_CPL_SHIFT) & 3;
    82458266    dc->iopl = (flags >> IOPL_SHIFT) & 3;
     
    83348355        if (dc->is_jmp)
    83358356            break;
     8357#ifdef VBOX
     8358#ifdef DEBUG
     8359/*
     8360        if(cpu_check_code_raw(env, pc_ptr, env->hflags | (env->eflags & (IOPL_MASK | TF_MASK | VM_MASK))) == ERROR_SUCCESS)
     8361        {
     8362            //should never happen as the jump to the patch code terminates the translation block
     8363            dprintf(("QEmu is about to execute instructions in our patch block at %08X!!\n", pc_ptr));
     8364        }
     8365*/
     8366#endif
     8367        if (env->state & CPU_EMULATE_SINGLE_INSTR)
     8368        {
     8369            env->state &= ~CPU_EMULATE_SINGLE_INSTR;
     8370            gen_jmp_im(pc_ptr - dc->cs_base);
     8371            gen_eob(dc);
     8372            break;
     8373        }
     8374#endif /* VBOX */
     8375
    83368376        /* if single step mode, we generate only one instruction and
    83378377           generate an exception */
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