mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-27 00:04:35 +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 ) );
|
||||
return t;
|
||||
#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) :: );
|
||||
return ( edx << 32 ) + eax;
|
||||
return ( uint64_t( edx ) << 32 ) + uint64_t( eax );
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user