We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1aa5907 + 19f3a40 commit a731a9bCopy full SHA for a731a9b
1 file changed
common_arm64.h
@@ -81,10 +81,12 @@ static void __inline blas_lock(volatile BLASULONG *address){
81
#if !defined(OS_DARWIN) && !defined (OS_ANDROID)
82
static __inline BLASULONG rpcc(void){
83
BLASULONG ret = 0;
84
+ blasint shift;
85
86
__asm__ __volatile__ ("isb; mrs %0,cntvct_el0":"=r"(ret));
87
+ __asm__ __volatile__ ("mrs %0,cntfrq_el0; clz %w0, %w0":"=&r"(shift));
88
- return ret;
89
+ return ret << shift;
90
}
91
92
#define RPCC_DEFINED
0 commit comments