diff --git a/include/mimalloc/prim.h b/include/mimalloc/prim.h index 1087d9b8..83364762 100644 --- a/include/mimalloc/prim.h +++ b/include/mimalloc/prim.h @@ -168,7 +168,7 @@ static inline void* mi_prim_tls_slot(size_t slot) mi_attr_noexcept { #if defined(__APPLE__) // M1, issue #343 __asm__ volatile ("mrs %0, tpidrro_el0\nbic %0, %0, #7" : "=r" (tcb)); #else - __asm__ volatile ("mrs %0, tpidr_el0" : "=r" (tcb)); + __asm__ volatile ("mrs %0, CTPIDR_EL0" : "=c" (tcb)); #endif res = tcb[slot]; #elif defined(__APPLE__) && defined(__POWERPC__) // ppc, issue #781