Changeset 81605 in vbox for trunk/include/iprt
- Timestamp:
- Oct 31, 2019 2:29:46 PM (5 years ago)
- Location:
- trunk/include/iprt
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/asm-amd64-x86.h
r81076 r81605 1587 1587 1588 1588 /** 1589 * Tests if it a genuine Hygon CPU based on the ASMCpuId(0) output. 1590 * 1591 * @returns true/false. 1592 * @param uEBX EBX return from ASMCpuId(0) 1593 * @param uECX ECX return from ASMCpuId(0) 1594 * @param uEDX EDX return from ASMCpuId(0) 1595 */ 1596 DECLINLINE(bool) ASMIsHygonCpuEx(uint32_t uEBX, uint32_t uECX, uint32_t uEDX) 1597 { 1598 return uEBX == UINT32_C(0x6f677948) 1599 && uECX == UINT32_C(0x656e6975) 1600 && uEDX == UINT32_C(0x6e65476e); 1601 } 1602 1603 1604 /** 1605 * Tests if this is a genuine Hygon CPU. 1606 * 1607 * @returns true/false. 1608 * @remarks ASSUMES that cpuid is supported by the CPU. 1609 */ 1610 DECLINLINE(bool) ASMIsHygonCpu(void) 1611 { 1612 uint32_t uEAX, uEBX, uECX, uEDX; 1613 ASMCpuId(0, &uEAX, &uEBX, &uECX, &uEDX); 1614 return ASMIsHygonCpuEx(uEBX, uECX, uEDX); 1615 } 1616 1617 1618 /** 1589 1619 * Checks whether ASMCpuId_EAX(0x00000000) indicates a valid range. 1590 1620 * -
trunk/include/iprt/x86.h
r81602 r81605 401 401 #define X86_CPUID_VENDOR_SHANGHAI_ECX 0x20206961 /* ai */ 402 402 #define X86_CPUID_VENDOR_SHANGHAI_EDX 0x68676e61 /* angh */ 403 404 #define X86_CPUID_VENDOR_HYGON_EBX 0x6f677948 /* Hygo */ 405 #define X86_CPUID_VENDOR_HYGON_ECX 0x656e6975 /* uine */ 406 #define X86_CPUID_VENDOR_HYGON_EDX 0x6e65476e /* nGen */ 403 407 /** @} */ 404 408 -
trunk/include/iprt/x86.mac
r76886 r81605 91 91 %define X86_CPUID_VENDOR_SHANGHAI_ECX 0x20206961 92 92 %define X86_CPUID_VENDOR_SHANGHAI_EDX 0x68676e61 93 %define X86_CPUID_VENDOR_HYGON_EBX 0x6f677948 94 %define X86_CPUID_VENDOR_HYGON_ECX 0x656e6975 95 %define X86_CPUID_VENDOR_HYGON_EDX 0x6e65476e 93 96 %define X86_CPUID_FEATURE_ECX_SSE3 RT_BIT_32(0) 94 97 %define X86_CPUID_FEATURE_ECX_PCLMUL RT_BIT_32(1)
Note:
See TracChangeset
for help on using the changeset viewer.