VirtualBox

忽略:
時間撮記:
2011-6-29 上午07:07:14 (14 年 以前)
作者:
vboxsync
svn:sync-xref-src-repo-rev:
72535
訊息:

rem: Synced with v0.12.5.

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • TabularUnified trunk/src/recompiler/target-i386/op_helper.c

    r36765 r37675  
    675675
    676676#ifdef VBOX
     677
    677678/* Keep in sync with gen_check_external_event() */
    678679void helper_check_external_event()
     
    695696        sync_seg(env, reg, env->segs[reg].newselector);
    696697}
     698
    697699#endif /* VBOX */
    698700
     
    714716void helper_outb(uint32_t port, uint32_t data)
    715717{
     718#ifndef VBOX
     719    cpu_outb(port, data & 0xff);
     720#else
    716721    cpu_outb(env, port, data & 0xff);
     722#endif
    717723}
    718724
    719725target_ulong helper_inb(uint32_t port)
    720726{
     727#ifndef VBOX
     728    return cpu_inb(port);
     729#else
    721730    return cpu_inb(env, port);
     731#endif
    722732}
    723733
    724734void helper_outw(uint32_t port, uint32_t data)
    725735{
     736#ifndef VBOX
     737    cpu_outw(port, data & 0xffff);
     738#else
    726739    cpu_outw(env, port, data & 0xffff);
     740#endif
    727741}
    728742
    729743target_ulong helper_inw(uint32_t port)
    730744{
     745#ifndef VBOX
     746    return cpu_inw(port);
     747#else
    731748    return cpu_inw(env, port);
     749#endif
    732750}
    733751
    734752void helper_outl(uint32_t port, uint32_t data)
    735753{
     754#ifndef VBOX
     755    cpu_outl(port, data);
     756#else
    736757    cpu_outl(env, port, data);
     758#endif
    737759}
    738760
    739761target_ulong helper_inl(uint32_t port)
    740762{
     763#ifndef VBOX
     764    return cpu_inl(port);
     765#else
    741766    return cpu_inl(env, port);
     767#endif
    742768}
    743769
     
    14061432        cpu_x86_set_cpl(env, 3);
    14071433    }
    1408 #ifdef CONFIG_KQEMU
    1409     if (kqemu_is_ok(env)) {
    1410         if (env->hflags & HF_LMA_MASK)
    1411             CC_OP = CC_OP_EFLAGS;
    1412         env->exception_index = -1;
    1413         cpu_loop_exit();
    1414     }
    1415 #endif
    14161434}
    14171435#endif
    14181436
    14191437#ifdef VBOX
     1438
    14201439/**
    14211440 * Checks and processes external VMM events.
     
    14591478    }
    14601479}
     1480
    14611481/* helper for recording call instruction addresses for later scanning */
    14621482void helper_record_call()
     
    14671487        remR3RecordCall(env);
    14681488}
     1489
    14691490#endif /* VBOX */
    14701491
     
    29452966        EIP = offset;
    29462967    }
    2947 #ifdef CONFIG_KQEMU
    2948     if (kqemu_is_ok(env)) {
    2949         env->exception_index = -1;
    2950         cpu_loop_exit();
    2951     }
    2952 #endif
    29532968}
    29542969
     
    30943109        if ((new_cs & 0x3) == 1 && (env->state & CPU_RAW_RING0))
    30953110        {
    3096 #ifdef DEBUG
     3111# ifdef DEBUG
    30973112            printf("RPL 1 -> new_cs %04X -> %04X\n", new_cs, new_cs & 0xfffc);
    3098 #endif
     3113# endif
    30993114            new_cs = new_cs & 0xfffc;
    31003115        }
     
    33263341    }
    33273342    env->hflags2 &= ~HF2_NMI_MASK;
    3328 #ifdef CONFIG_KQEMU
    3329     if (kqemu_is_ok(env)) {
    3330         CC_OP = CC_OP_EFLAGS;
    3331         env->exception_index = -1;
    3332         cpu_loop_exit();
    3333     }
    3334 #endif
    33353343}
    33363344
     
    33383346{
    33393347    helper_ret_protected(shift, 0, addend);
    3340 #ifdef CONFIG_KQEMU
    3341     if (kqemu_is_ok(env)) {
    3342         env->exception_index = -1;
    3343         cpu_loop_exit();
    3344     }
    3345 #endif
    33463348}
    33473349
     
    34163418    ESP = ECX;
    34173419    EIP = EDX;
    3418 #ifdef CONFIG_KQEMU
    3419     if (kqemu_is_ok(env)) {
    3420         env->exception_index = -1;
    3421         cpu_loop_exit();
    3422     }
    3423 #endif
    34243420}
    34253421
     
    35363532}
    35373533
    3538 #ifdef VBOX
    35393534void helper_rdtscp(void)
    35403535{
     3536#ifndef VBOX
     3537    helper_rdtsc();
     3538    ECX = (uint32_t)(env->tsc_aux);
     3539#else
    35413540    uint64_t val;
    35423541    if ((env->cr[4] & CR4_TSD_MASK) && ((env->hflags & HF_CPL_MASK) != 0)) {
     
    35513550    else
    35523551        ECX = 0;
    3553 }
    35543552#endif /* VBOX */
     3553}
    35553554
    35563555void helper_rdpmc(void)
     
    37053704            env->mcg_ctl = val;
    37063705        break;
     3706    case MSR_TSC_AUX:
     3707        env->tsc_aux = val;
     3708        break;
    37073709# endif /* !VBOX */
    37083710    default:
     
    37883790        val = env->kernelgsbase;
    37893791        break;
    3790 #endif
    3791 #ifdef CONFIG_KQEMU
    3792     case MSR_QPI_COMMBASE:
    3793         if (env->kqemu_enabled) {
    3794             val = kqemu_comm_base;
    3795         } else {
    3796             val = 0;
    3797         }
    3798         break;
     3792# ifndef VBOX
     3793    case MSR_TSC_AUX:
     3794        val = env->tsc_aux;
     3795        break;
     3796# endif /*!VBOX*/
    37993797#endif
    38003798# ifndef VBOX
     
    50105008    target_ulong addr;
    50115009
     5010    /* The operand must be 16 byte aligned */
     5011    if (ptr & 0xf) {
     5012        raise_exception(EXCP0D_GPF);
     5013    }
     5014
    50125015    fpus = (env->fpus & ~0x3800) | (env->fpstt & 0x7) << 11;
    50135016    fptag = 0;
     
    50655068    CPU86_LDouble tmp;
    50665069    target_ulong addr;
     5070
     5071    /* The operand must be 16 byte aligned */
     5072    if (ptr & 0xf) {
     5073        raise_exception(EXCP0D_GPF);
     5074    }
    50675075
    50685076    env->fpuc = lduw(ptr);
     
    67326740}
    67336741
    6734 target_ulong helper_bsr(target_ulong t0)
     6742target_ulong helper_lzcnt(target_ulong t0, int wordsize)
    67356743{
    67366744    int count;
    67376745    target_ulong res, mask;
    67386746
     6747    if (wordsize > 0 && t0 == 0) {
     6748        return wordsize;
     6749    }
    67396750    res = t0;
    67406751    count = TARGET_LONG_BITS - 1;
     
    67446755        res <<= 1;
    67456756    }
     6757    if (wordsize > 0) {
     6758        return wordsize - 1 - count;
     6759    }
    67466760    return count;
    67476761}
    67486762
     6763target_ulong helper_bsr(target_ulong t0)
     6764{
     6765        return helper_lzcnt(t0, 0);
     6766}
    67496767
    67506768static int compute_all_eflags(void)
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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