Changeset 54251 in vbox
- Timestamp:
- Feb 17, 2015 7:22:22 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/asm-amd64-x86.h
r53405 r54251 72 72 # pragma intrinsic(__readeflags) 73 73 # pragma intrinsic(__writeeflags) 74 # pragma intrinsic(__rdtscp) 74 75 # endif 75 76 #endif … … 546 547 mov [u.s.Lo], eax 547 548 mov [u.s.Hi], edx 549 } 550 # endif 551 # endif 552 return u.u; 553 } 554 #endif 555 556 557 /** 558 * Gets the content of the CPU timestamp counter register and the 559 * assoicated AUX value. 560 * 561 * @returns TSC. 562 * @param puAux Where to store the AUX value. 563 */ 564 #if RT_INLINE_ASM_EXTERNAL && RT_INLINE_ASM_USES_INTRIN < 15 565 DECLASM(uint64_t) ASMReadTscWithAux(uint32_t *puAux); 566 #else 567 DECLINLINE(uint64_t) ASMReadTscWithAux(uint32_t *puAux) 568 { 569 RTUINT64U u; 570 # if RT_INLINE_ASM_GNU_STYLE 571 __asm__ __volatile__("rdtscp\n\t" : "=a" (u.s.Lo), "=d" (u.s.Hi), "=c" (*puAux)); 572 # else 573 # if RT_INLINE_ASM_USES_INTRIN >= 15 574 u.u = __rdtscp(puAux); 575 # else 576 __asm 577 { 578 rdtscp 579 mov [u.s.Lo], eax 580 mov [u.s.Hi], edx 581 mov eax, [puAux] 582 mov [eax], ecx 548 583 } 549 584 # endif
Note:
See TracChangeset
for help on using the changeset viewer.