VirtualBox

Changeset 18770 in vbox for trunk/src/recompiler_new


Ignore:
Timestamp:
Apr 6, 2009 3:00:15 PM (16 years ago)
Author:
vboxsync
Message:

Fake rdpmc instead of causing an invalid opcode exception.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/recompiler_new/target-i386/op_helper.c

    r18475 r18770  
    37003700void helper_rdpmc(void)
    37013701{
     3702#ifdef VBOX
     3703    /* If X86_CR4_PCE is *not* set, then CPL must be zero. */
     3704    if (!(env->cr[4] & CR4_PCE_MASK) && ((env->hflags & HF_CPL_MASK) != 0)) {
     3705        raise_exception(EXCP0D_GPF);
     3706    }
     3707    /* Just return zero here; rather tricky to properly emulate this, especially as the specs are a mess. */
     3708    EAX = 0;
     3709    EDX = 0;
     3710#else
    37023711    if ((env->cr[4] & CR4_PCE_MASK) && ((env->hflags & HF_CPL_MASK) != 0)) {
    37033712        raise_exception(EXCP0D_GPF);
     
    37073716    /* currently unimplemented */
    37083717    raise_exception_err(EXCP06_ILLOP, 0);
     3718#endif
    37093719}
    37103720
Note: See TracChangeset for help on using the changeset viewer.

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