Changeset 98cf828
- Timestamp:
- Aug 31, 2020, 7:03:11 AM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 8ec4a52
- Parents:
- b26144d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/bits/defs.hfa
rb26144d r98cf828 10 10 // Created On : Thu Nov 9 13:24:10 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Aug 13 22:00:23202013 // Update Count : 1912 // Last Modified On : Wed Aug 26 16:22:32 2020 13 // Update Count : 20 14 14 // 15 15 … … 49 49 50 50 static inline long long int rdtscl(void) { 51 #if defined( __aarch64__ ) 51 #if defined( __i386 ) || defined( __x86_64 ) 52 unsigned int lo, hi; 53 __asm__ __volatile__ ("rdtsc" : "=a"(lo), "=d"(hi)); 54 return ( (unsigned long long)lo)|( ((unsigned long long)hi)<<32 ); 55 #elif defined( __aarch64__ ) || defined( __arm__ ) 52 56 // https://github.com/google/benchmark/blob/v1.1.0/src/cycleclock.h#L116 53 57 long long int virtual_timer_value; … … 55 59 return virtual_timer_value; 56 60 #else 57 unsigned int lo, hi; 58 __asm__ __volatile__ ("rdtsc" : "=a"(lo), "=d"(hi)); 59 return ( (unsigned long long)lo)|( ((unsigned long long)hi)<<32 ); 61 #error unsupported hardware architecture 60 62 #endif // __ARM_ARCH 61 63 }
Note: See TracChangeset
for help on using the changeset viewer.