Skip to content

Commit b687fba

Browse files
authored
Disable direct clock register access on IOS and Android
as I find conflicting information on accessibility from non-priviledged processes
1 parent f2cde2c commit b687fba

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

common_arm64.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,17 +78,18 @@ static void __inline blas_lock(volatile BLASULONG *address){
7878

7979
#define BLAS_LOCK_DEFINED
8080

81+
#if !defined(OS_DARWIN) && !defined (OS_ANDROID)
8182
static __inline BLASULONG rpcc(void){
8283
BLASULONG ret = 0;
8384

84-
__asm__ __volatile__ ("mrs %0,cntvct_el0":"=r"(ret));
85+
__asm__ __volatile__ ("isb; mrs %0,cntvct_el0":"=r"(ret));
8586

8687
return ret;
8788
}
8889

8990
#define RPCC_DEFINED
9091
#define RPCC64BIT
91-
92+
#endif
9293

9394
static inline int blas_quickdivide(blasint x, blasint y){
9495
return x / y;

0 commit comments

Comments
 (0)