Changeset 54253 in vbox
- Timestamp:
- Feb 17, 2015 7:44:15 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/testcase/tstRTInlineAsm.cpp
r52454 r54253 42 42 #if !defined(GCC44_32BIT_PIC) && (defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)) 43 43 # include <iprt/asm-amd64-x86.h> 44 # include <iprt/x86.h> 44 45 #else 45 46 # include <iprt/time.h> … … 1685 1686 BENCH(s_u8 = ASMGetApicId(), "ASMGetApicId"); 1686 1687 #endif 1688 #if !defined(GCC44_32BIT_PIC) && (defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)) 1689 BENCH(s_u64 = ASMReadTSC(), "ASMReadTSC"); 1690 uint32_t uAux; 1691 if ( ASMHasCpuId() 1692 && ASMIsValidExtRange(ASMCpuId_EAX(0x80000000)) 1693 && (ASMCpuId_EDX(0x80000001) & X86_CPUID_EXT_FEATURE_EDX_RDTSCP) ) 1694 BENCH(s_u64 = ASMReadTscWithAux(&uAux), "ASMReadTscWithAux"); 1695 union 1696 { 1697 uint64_t u64[2]; 1698 RTIDTR Unaligned; 1699 struct 1700 { 1701 uint16_t abPadding[3]; 1702 RTIDTR Aligned; 1703 } s; 1704 } uBuf; 1705 Assert(((uintptr_t)&uBuf.Unaligned.pIdt & (sizeof(uintptr_t) - 1)) != 0); 1706 BENCH(ASMGetIDTR(&uBuf.Unaligned), "ASMGetIDTR/unaligned"); 1707 Assert(((uintptr_t)&uBuf.s.Aligned.pIdt & (sizeof(uintptr_t) - 1)) == 0); 1708 BENCH(ASMGetIDTR(&uBuf.s.Aligned), "ASMGetIDTR/aligned"); 1709 #endif 1687 1710 1688 1711 #undef BENCH
Note:
See TracChangeset
for help on using the changeset viewer.