[PATCH] nptl: fix __builtin_thread_pointer detection on LoongArch
caiyinyu
caiyinyu@loongson.cn
Tue Nov 5 02:34:07 GMT 2024
this is version 3 disscussed in https://sourceware.org/pipermail/libc-alpha/2024-November/161236.html
v2: https://sourceware.org/pipermail/libc-alpha/2024-November/161213.html
v1: https://sourceware.org/pipermail/libc-alpha/2024-November/161185.html
---
sysdeps/loongarch/nptl/thread_pointer.h | 6 ------
1 file changed, 6 deletions(-)
diff --git a/sysdeps/loongarch/nptl/thread_pointer.h b/sysdeps/loongarch/nptl/thread_pointer.h
index 5dec2ef4c6..3c5367af24 100644
--- a/sysdeps/loongarch/nptl/thread_pointer.h
+++ b/sysdeps/loongarch/nptl/thread_pointer.h
@@ -19,18 +19,12 @@
#ifndef _SYS_THREAD_POINTER_H
#define _SYS_THREAD_POINTER_H
-#include <sys/cdefs.h>
-
static inline void *
__thread_pointer (void)
{
-#if __glibc_has_builtin (__builtin_thread_pointer)
- return __builtin_thread_pointer ();
-#else
void *__thread_register;
__asm__ ("move %0, $tp" : "=r" (__thread_register));
return __thread_register;
-#endif
}
#endif /* _SYS_THREAD_POINTER_H */
--
2.45.2
More information about the Libc-alpha
mailing list