@ -367,7 +367,7 @@ aff_iterate_core(struct affinity *acb CK_CC_UNUSED, unsigned int *core)
CK_CC_INLINE static uint64_t
rdtsc ( void )
{
# if defined(__x86_64__) || defined(__x86__)
# if defined(__x86_64__)
uint32_t eax = 0 , edx ;
# if defined(CK_MD_RDTSCP)
__asm__ __volatile__ ( " rdtscp "
@ -377,7 +377,30 @@ rdtsc(void)
return ( ( ( uint64_t ) edx < < 32 ) | eax ) ;
# else
__asm__ __volatile__ ( " cpuid; "
" rdtsc; "
: " +a " ( eax ) , " =d " ( edx )
:
: " %ebx " , " %ecx " , " memory " ) ;
__asm__ __volatile__ ( " xorl %%eax, %%eax; "
" cpuid; "
:
:
: " %eax " , " %ebx " , " %ecx " , " %edx " , " memory " ) ;
return ( ( ( uint64_t ) edx < < 32 ) | eax ) ;
# endif /* !CK_MD_RDTSCP */
# elif defined(__x86__)
uint32_t eax = 0 , edx ;
# if defined(CK_MD_RDTSCP)
__asm__ __volatile__ ( " rdtscp "
: " +a " ( eax ) , " =d " ( edx )
:
: " %ecx " , " memory " ) ;
return ( ( ( uint64_t ) edx < < 32 ) | eax ) ;
# else
__asm__ __volatile__ ( " pushl %%ebx; "
" cpuid; "
" rdtsc; "