mirror of
https://github.com/wolfpld/tracy
synced 2025-05-05 22:53:52 +00:00
Use 32-bit registers for rdtscp output.
This commit is contained in:
parent
34123de977
commit
68f5a17bca
@ -54,9 +54,9 @@ public:
|
|||||||
const auto t = int64_t( __rdtscp( &cpu ) );
|
const auto t = int64_t( __rdtscp( &cpu ) );
|
||||||
return t;
|
return t;
|
||||||
#elif defined __i386 || defined _M_IX86 || defined __x86_64__ || defined _M_X64
|
#elif defined __i386 || defined _M_IX86 || defined __x86_64__ || defined _M_X64
|
||||||
uint64_t eax, edx;
|
uint32_t eax, edx;
|
||||||
asm volatile ( "rdtscp" : "=a" (eax), "=d" (edx), "=c" (cpu) :: );
|
asm volatile ( "rdtscp" : "=a" (eax), "=d" (edx), "=c" (cpu) :: );
|
||||||
return ( edx << 32 ) + eax;
|
return ( uint64_t( edx ) << 32 ) + uint64_t( eax );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user