summaryrefslogtreecommitdiff
path: root/include/mimalloc-internal.h
diff options
context:
space:
mode:
authorDaan Leijen <daan@microsoft.com>2021-01-28 17:36:56 -0800
committerDaan Leijen <daan@microsoft.com>2021-01-28 17:36:56 -0800
commit78ce716e2d5b1572e9b459cba12830e88c892989 (patch)
tree45e037ceea05699f82f7abe59d8541d90a0f292f /include/mimalloc-internal.h
parent8d4444ef00c8aa3c073ea9a744659a74db75980a (diff)
add comment on use of tpidrro_el0 on macOS
Diffstat (limited to 'include/mimalloc-internal.h')
-rw-r--r--include/mimalloc-internal.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/mimalloc-internal.h b/include/mimalloc-internal.h
index e1190c7..6a239f1 100644
--- a/include/mimalloc-internal.h
+++ b/include/mimalloc-internal.h
@@ -707,7 +707,7 @@ static inline void* mi_tls_slot(size_t slot) mi_attr_noexcept {
res = tcb[slot];
#elif defined(__aarch64__)
void** tcb; UNUSED(ofs);
-#if defined(__APPLE__)
+#if defined(__APPLE__) // issue #343
__asm__ volatile ("mrs %0, tpidrro_el0" : "=r" (tcb));
#else
__asm__ volatile ("mrs %0, tpidr_el0" : "=r" (tcb));
@@ -734,7 +734,7 @@ static inline void mi_tls_slot_set(size_t slot, void* value) mi_attr_noexcept {
tcb[slot] = value;
#elif defined(__aarch64__)
void** tcb; UNUSED(ofs);
-#if defined(__APPLE__)
+#if defined(__APPLE__) // issue #343
__asm__ volatile ("mrs %0, tpidrro_el0" : "=r" (tcb));
#else
__asm__ volatile ("mrs %0, tpidr_el0" : "=r" (tcb));