VirtualBox

Changeset 15216 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Dec 9, 2008 11:54:01 PM (16 years ago)
Author:
vboxsync
Message:

iprt/asm.h: Fixed buggy ASMIsIntelCpu and ASMIsIntelCpuEx; the latter was OR'ing instead of ANDing, while the former was reading the wrong leaf.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/asm.h

    r14808 r15216  
    956956{
    957957    return uEBX == 0x756e6547
    958         || uECX == 0x6c65746e
    959         || uEDX == 0x49656e69;
     958        && uECX == 0x6c65746e
     959        && uEDX == 0x49656e69;
    960960}
    961961
     
    969969{
    970970    uint32_t uEAX, uEBX, uECX, uEDX;
    971     ASMCpuId(1, &uEAX, &uEBX, &uECX, &uEDX);
     971    ASMCpuId(0, &uEAX, &uEBX, &uECX, &uEDX);
    972972    return ASMIsIntelCpuEx(uEBX, uECX, uEDX);
    973973}
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