[PATCH v2 1/2] x86: Remove stale __GNUC_PREREQ (11, 1) test from __thread_pointer()
H.J. Lu
hjl.tools@gmail.com
Wed Sep 10 11:50:38 GMT 2025
On Tue, Sep 9, 2025 at 11:44 PM Uros Bizjak <ubizjak@gmail.com> wrote:
>
> GCC 12 is currently the minimum supported compiler version.
> Remove no longer needed __GNUC_PREREQ (11, 1) test from
> __thread_pointer().
>
> Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
> Cc: H.J.Lu <hjl.tools@gmail.com>
> Cc: Florian Weimer <fweimer@redhat.com>
> Cc: Carlos O'Donell <carlos@redhat.com>
> ---
> sysdeps/x86/thread_pointer.h | 10 ----------
> 1 file changed, 10 deletions(-)
>
> diff --git a/sysdeps/x86/thread_pointer.h b/sysdeps/x86/thread_pointer.h
> index c1746d3fae..c694fc20a2 100644
> --- a/sysdeps/x86/thread_pointer.h
> +++ b/sysdeps/x86/thread_pointer.h
> @@ -24,17 +24,7 @@
> static inline void *
> __thread_pointer (void)
> {
> -#if __GNUC_PREREQ (11, 1)
> return __builtin_thread_pointer ();
> -#else
> - void *__result;
> -# ifdef __x86_64__
> - __asm__ ("mov %%fs:0, %0" : "=r" (__result));
> -# else
> - __asm__ ("mov %%gs:0, %0" : "=r" (__result));
> -# endif
> - return __result;
> -#endif /* !GCC 11 */
> }
>
> #endif /* _SYS_THREAD_POINTER_H */
> --
> 2.51.0
>
LGTM.
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
Thanks.
--
H.J.
More information about the Libc-alpha
mailing list