Changeset 98cf828


Ignore:
Timestamp:
Aug 31, 2020, 7:03:11 AM (15 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast-unique-expr
Children:
8ec4a52
Parents:
b26144d
Message:

update ARM architecture code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/bits/defs.hfa

    rb26144d r98cf828  
    1010// Created On       : Thu Nov  9 13:24:10 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Aug 13 22:00:23 2020
    13 // Update Count     : 19
     12// Last Modified On : Wed Aug 26 16:22:32 2020
     13// Update Count     : 20
    1414//
    1515
     
    4949
    5050static 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__ )
    5256        // https://github.com/google/benchmark/blob/v1.1.0/src/cycleclock.h#L116
    5357        long long int virtual_timer_value;
     
    5559        return virtual_timer_value;
    5660        #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
    6062        #endif // __ARM_ARCH
    6163}
Note: See TracChangeset for help on using the changeset viewer.