diff options
author | Daan <daanl@outlook.com> | 2021-12-12 10:35:13 -0800 |
---|---|---|
committer | Daan <daanl@outlook.com> | 2021-12-12 10:35:13 -0800 |
commit | 3a212d1895c8722a31a78d354793fbd6b2f3192f (patch) | |
tree | f8773b6a703a429c10e2c3efae7c02a864d2f153 /include/mimalloc-internal.h | |
parent | 4a590b1447e9d27e00dcd5bc9ac62eab6d7e51bb (diff) |
fix assembly for mi_tls_slot_set on x32 and x64. Issue #488
Diffstat (limited to 'include/mimalloc-internal.h')
-rw-r--r-- | include/mimalloc-internal.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/mimalloc-internal.h b/include/mimalloc-internal.h index cf5b678..4713a75 100644 --- a/include/mimalloc-internal.h +++ b/include/mimalloc-internal.h @@ -746,9 +746,9 @@ static inline void mi_tls_slot_set(size_t slot, void* value) mi_attr_noexcept { #elif defined(__APPLE__) && defined(__x86_64__) __asm__("movq %1,%%gs:%0" : "=m" (*((void**)ofs)) : "rn" (value) : ); // x86_64 macOSX uses GS #elif defined(__x86_64__) && (MI_INTPTR_SIZE==4) - __asm__("movl %1,%%fs:%1" : "=m" (*((void**)ofs)) : "rn" (value) : ); // x32 ABI + __asm__("movl %1,%%fs:%0" : "=m" (*((void**)ofs)) : "rn" (value) : ); // x32 ABI #elif defined(__x86_64__) - __asm__("movq %1,%%fs:%1" : "=m" (*((void**)ofs)) : "rn" (value) : ); // x86_64 Linux, BSD uses FS + __asm__("movq %1,%%fs:%0" : "=m" (*((void**)ofs)) : "rn" (value) : ); // x86_64 Linux, BSD uses FS #elif defined(__arm__) void** tcb; MI_UNUSED(ofs); __asm__ volatile ("mrc p15, 0, %0, c13, c0, 3\nbic %0, %0, #3" : "=r" (tcb)); |