Changeset 54818 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Mar 17, 2015 5:50:15 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/CPUMR3CpuId.cpp
r54815 r54818 4372 4372 " %s\n" 4373 4373 " Leaf/sub-leaf eax ebx ecx edx\n", pszTitle); 4374 while ( pCurLeaf - paLeaves< cLeaves4374 while ( (uintptr_t)(pCurLeaf - paLeaves) < cLeaves 4375 4375 && pCurLeaf->uLeaf <= uUpToLeaf) 4376 4376 { … … 4439 4439 { 4440 4440 ASMCpuIdExSlow(uLeaf, 0, uSubLeaf, 0, &Host.uEax, &Host.uEbx, &Host.uEcx, &Host.uEdx); 4441 if ( pCurLeaf - paLeaves< cLeaves4441 if ( (uintptr_t)(pCurLeaf - paLeaves) < cLeaves 4442 4442 && pCurLeaf->uLeaf == uLeaf 4443 4443 && pCurLeaf->uSubLeaf == uSubLeaf) … … 4458 4458 4459 4459 /* Done? */ 4460 if ( ( pCurLeaf - paLeaves>= cLeaves4460 if ( ( (uintptr_t)(pCurLeaf - paLeaves) >= cLeaves 4461 4461 || pCurLeaf->uLeaf != uLeaf) 4462 4462 && ( (uLeaf == 0x4 && ((Host.uEax & 0x000f) == 0 || (Host.uEax & 0x000f) >= 8)) … … 4687 4687 ASMCpuIdExSlow(UINT32_C(0x40000000), 0, 0, 0, &Host.uEax, &Host.uEbx, &Host.uEcx, &Host.uEdx); 4688 4688 cHstMax = Host.uEax >= UINT32_C(0x40000001) && Host.uEax <= UINT32_C(0x40000fff) ? Host.uEax : 0; 4689 cGstMax = pCurLeaf - paLeaves< cLeaves && pCurLeaf->uLeaf == UINT32_C(0x40000000)4689 cGstMax = (uintptr_t)(pCurLeaf - paLeaves) < cLeaves && pCurLeaf->uLeaf == UINT32_C(0x40000000) 4690 4690 ? RT_MIN(pCurLeaf->uEax, UINT32_C(0x40000fff)) : 0; 4691 4691 cMax = RT_MAX(cHstMax, cGstMax); … … 4708 4708 ASMCpuIdExSlow(UINT32_C(0x80000000), 0, 0, 0, &Host.uEax, &Host.uEbx, &Host.uEcx, &Host.uEdx); 4709 4709 cHstMax = ASMIsValidExtRange(Host.uEax) ? RT_MIN(Host.uEax, UINT32_C(0x80000fff)) : 0; 4710 cGstMax = pCurLeaf - paLeaves< cLeaves && pCurLeaf->uLeaf == UINT32_C(0x80000000)4710 cGstMax = (uintptr_t)(pCurLeaf - paLeaves) < cLeaves && pCurLeaf->uLeaf == UINT32_C(0x80000000) 4711 4711 ? RT_MIN(pCurLeaf->uEax, UINT32_C(0x80000fff)) : 0; 4712 4712 cMax = RT_MAX(cHstMax, cGstMax); … … 4727 4727 { 4728 4728 ASMCpuIdExSlow(uLeaf, 0, uSubLeaf, 0, &Host.uEax, &Host.uEbx, &Host.uEcx, &Host.uEdx); 4729 if ( pCurLeaf - paLeaves< cLeaves4729 if ( (uintptr_t)(pCurLeaf - paLeaves) < cLeaves 4730 4730 && pCurLeaf->uLeaf == uLeaf 4731 4731 && pCurLeaf->uSubLeaf == uSubLeaf) … … 4746 4746 4747 4747 /* Done? */ 4748 if ( ( pCurLeaf - paLeaves>= cLeaves4748 if ( ( (uintptr_t)(pCurLeaf - paLeaves) >= cLeaves 4749 4749 || pCurLeaf->uLeaf != uLeaf) 4750 4750 && (uLeaf == UINT32_C(0x8000001d) && ((Host.uEax & 0x000f) == 0 || (Host.uEax & 0x000f) >= 8)) ) … … 5047 5047 cHstMax = Host.uEax >= UINT32_C(0xc0000001) && Host.uEax <= UINT32_C(0xc0000fff) 5048 5048 ? RT_MIN(Host.uEax, UINT32_C(0xc0000fff)) : 0; 5049 cGstMax = pCurLeaf - paLeaves< cLeaves && pCurLeaf->uLeaf == UINT32_C(0xc0000000)5049 cGstMax = (uintptr_t)(pCurLeaf - paLeaves) < cLeaves && pCurLeaf->uLeaf == UINT32_C(0xc0000000) 5050 5050 ? RT_MIN(pCurLeaf->uEax, UINT32_C(0xc0000fff)) : 0; 5051 5051 cMax = RT_MAX(cHstMax, cGstMax);
Note:
See TracChangeset
for help on using the changeset viewer.