VirtualBox

Changeset 33206 in vbox for trunk/src/VBox/Runtime/testcase


Ignore:
Timestamp:
Oct 18, 2010 2:59:01 PM (14 years ago)
Author:
vboxsync
Message:

tstRTInlineAsm: fixed CpuId test for newer Intel CPUs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/testcase/tstRTInlineAsm.cpp

    r33198 r33206  
    206206    for (unsigned iStd = 0; iStd <= cFunctions + 3; iStd++)
    207207    {
    208         if (iStd == 4)
    209             continue; /* Leaf 04 output depends on the initial value of ECX */
    210         ASMCpuId(iStd, &s.uEAX, &s.uEBX, &s.uECX, &s.uEDX);
     208        ASMCpuId_Idx_ECX(iStd, 0, &s.uEAX, &s.uEBX, &s.uECX, &s.uEDX);
    211209        RTTestIPrintf(RTTESTLVL_ALWAYS, "%08x  %08x %08x %08x %08x%s\n",
    212210                      iStd, s.uEAX, s.uEBX, s.uECX, s.uEDX, iStd <= cFunctions ? "" : "*");
     211
     212        if (iStd == 0x04 || iStd == 0x0d || iStd > cFunctions)
     213            continue; /* Leaf 04 and leaf 0d output depend on the initial value of ECX
     214                       * The same seems to apply to invalid standard functions */
    213215
    214216        u32 = ASMCpuId_EAX(iStd);
     
    334336        RTTestIPrintf(RTTESTLVL_ALWAYS, "%08x  %08x %08x %08x %08x%s\n",
    335337                      iExt, s.uEAX, s.uEBX, s.uECX, s.uEDX, iExt <= cExtFunctions ? "" : "*");
     338
     339        if (iExt > cExtFunctions)
     340            continue;   /* Invalid extended functions seems change the value if ECX changes */
    336341
    337342        u32 = ASMCpuId_EAX(iExt);
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