VirtualBox

Changeset 14425

Show
Ignore:
Timestamp:
11/20/08 17:32:52 (2 months ago)
Author:
vboxsync
Message:

ported r39642 - Sander, please tell me to port such changes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/recompiler_new/VBoxRecompiler.c

    r14418 r14425  
    42354235    LogFlow(("cpu_apic_wrmsr: rc=%Rrc\n", rc)); NOREF(rc); 
    42364236} 
     4237 
     4238uint64_t cpu_rdmsr(CPUX86State *env, uint32_t msr)  
     4239{  
     4240    return CPUMGetGuestMsr(env->pVM, msr);  
     4241}  
     4242 
     4243void cpu_wrmsr(CPUX86State *env, uint32_t msr, uint64_t val)  
     4244{  
     4245    CPUMSetGuestMsr(env->pVM, msr, val);  
     4246}  
    42374247/* -+- I/O Ports -+- */ 
    42384248 
  • trunk/src/recompiler_new/target-i386/cpu.h

    r13731 r14425  
    923923uint64_t cpu_apic_rdmsr(CPUX86State *env, uint32_t reg); 
    924924void     cpu_apic_wrmsr(CPUX86State *env, uint32_t reg, uint64_t value); 
     925uint64_t cpu_rdmsr(CPUX86State *env, uint32_t msr);  
     926void     cpu_wrmsr(CPUX86State *env, uint32_t msr, uint64_t val);  
    925927#endif 
    926928void cpu_smm_update(CPUX86State *env); 
  • trunk/src/recompiler_new/target-i386/translate.c

    r13999 r14425  
    641641 
    642642    /* For other segments this check is waste of time, and also TCG is unable to cope with this code, 
    643        for data segments, as expects alive temps */ 
    644     if (reg != R_GS) 
     643       for data/stack segments, as expects alive cpu_T[0] */ 
     644    if (reg != R_GS)  
    645645        return; 
    646646 
     
    76427642        op = (modrm >> 3) & 7; 
    76437643        rm = modrm & 7; 
     7644 
     7645#ifdef VBOX 
     7646        /* 0f 01 f9 */ 
     7647        if (modrm == 0xf9) 
     7648        { 
     7649            if (!(s->cpuid_ext2_features & CPUID_EXT2_RDTSCP)) 
     7650                goto illegal_op; 
     7651            gen_jmp_im(pc_start - s->cs_base); 
     7652            tcg_gen_helper_0_0(helper_rdtscp); 
     7653            break; 
     7654        } 
     7655#endif 
    76447656        switch(op) { 
    76457657        case 0: /* sgdt */ 

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy