mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
* csu/Versions: Use %include <tls.h> to get USE_TLS defined.
(libc: GLIBC_2.0) [USE_TLS && HAVE___THREAD]: Remove _errno, errno. (libc: GLIBC_2.3) [USE_TLS && HAVE___THREAD]: Put errno here instead. * resolv/Versions: Use %include <tls.h> to get USE_TLS defined. (libc: GLIBC_2.0) [USE_TLS && HAVE___THREAD]: Remove _h_errno, h_errno, and _res. (libc: GLIBC_2.3) [USE_TLS && HAVE___THREAD]: Put h_errno, _res here. * elf/tls-macros.h [__x86_64__] (TLS_LE, TLS_IE, TLS_LD, TLS_GD): New macros for x86-64. * sysdeps/unix/sysv/linux/alpha/bits/time.h: File removed. It was indentical to the linux/bits/time.h file. * nscd/nscd_gethst_r.c (nscd_gethst_r): Add a cast to silence warning. * resolv/gethnamaddr.c (gethostbyaddr): Use socklen_t for SIZE.
This commit is contained in:
@ -95,7 +95,42 @@
|
||||
__l; })
|
||||
# endif
|
||||
|
||||
#elif defined __x86_64__
|
||||
|
||||
# define TLS_LE(x) \
|
||||
({ int *__l; \
|
||||
asm ("movq %%fs:0,%0\n\t" \
|
||||
"leaq " #x "@tpoff(%0), %0" \
|
||||
: "=r" (__l)); \
|
||||
__l; })
|
||||
|
||||
# define TLS_IE(x) \
|
||||
({ int *__l; \
|
||||
asm ("movq %%fs:0,%0\n\t" \
|
||||
"addq " #x "@gottpoff(%%rip),%0" \
|
||||
: "=r" (__l)); \
|
||||
__l; })
|
||||
|
||||
# define TLS_LD(x) \
|
||||
({ int *__l, __c, __d; \
|
||||
asm ("leaq " #x "@tlsld(%%rip),%%rdi\n\t" \
|
||||
"callq __tls_get_addr@plt\n\t" \
|
||||
"leaq " #x "@dtpoff(%%rax), %%rax" \
|
||||
: "=a" (__l), "=&c" (__c), "=&d" (__d) \
|
||||
: : "rdi", "rsi", "r8", "r9", "r10", "r11"); \
|
||||
__l; })
|
||||
|
||||
# define TLS_GD(x) \
|
||||
({ int *__l, __c, __d; \
|
||||
asm (".long 0x66666666\n\t" \
|
||||
"leaq " #x "@tlsgd(%%rip),%%rdi\n\t" \
|
||||
"callq __tls_get_addr@plt" \
|
||||
: "=a" (__l), "=&c" (__c), "=&d" (__d) \
|
||||
: : "rdi", "rsi", "r8", "r9", "r10", "r11"); \
|
||||
__l; })
|
||||
|
||||
#elif defined __sh__
|
||||
|
||||
# define TLS_LE(x) \
|
||||
({ int *__l; void *__tp; \
|
||||
asm ("stc gbr,%1\n\t" \
|
||||
|
Reference in New Issue
Block a user