Changeset ce55a81 for libcfa/src/bits/defs.hfa
- Timestamp:
- Sep 4, 2020, 2:14:10 PM (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:
- 14d8a9b
- Parents:
- 56c44dc (diff), 2801829 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/bits/defs.hfa
r56c44dc rce55a81 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.