aboutsummaryrefslogtreecommitdiff
path: root/elf/tls-macros.h
diff options
context:
space:
mode:
Diffstat (limited to 'elf/tls-macros.h')
-rw-r--r--elf/tls-macros.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/elf/tls-macros.h b/elf/tls-macros.h
index 35b57d4..26745e9 100644
--- a/elf/tls-macros.h
+++ b/elf/tls-macros.h
@@ -49,15 +49,15 @@
# ifdef PIC
# define TLS_LD(x) \
- ({ int *__l; \
+ ({ int *__l, __c, __d; \
asm ("leal " #x "@tlsldm(%%ebx),%%eax\n\t" \
"call ___tls_get_addr@plt\n\t" \
"leal " #x "@dtpoff(%%eax), %%eax" \
- : "=a" (__l)); \
+ : "=a" (__l), "=&c" (__c), "=&d" (__d)); \
__l; })
# else
# define TLS_LD(x) \
- ({ int *__l, __b; \
+ ({ int *__l, __b, __c, __d; \
asm ("call 1f\n\t" \
".subsection 1\n" \
"1:\tmovl (%%esp), %%ebx\n\t" \
@@ -67,21 +67,21 @@
"leal " #x "@tlsldm(%%ebx),%%eax\n\t" \
"call ___tls_get_addr@plt\n\t" \
"leal " #x "@dtpoff(%%eax), %%eax" \
- : "=a" (__l), "=&b" (__b)); \
+ : "=a" (__l), "=&b" (__b), "=&c" (__c), "=&d" (__d)); \
__l; })
# endif
# ifdef PIC
# define TLS_GD(x) \
- ({ int *__l; \
+ ({ int *__l, __c, __d; \
asm ("leal " #x "@tlsgd(%%ebx),%%eax\n\t" \
"call ___tls_get_addr@plt\n\t" \
"nop" \
- : "=a" (__l)); \
+ : "=a" (__l), "=&c" (__c), "=&d" (__d)); \
__l; })
# else
# define TLS_GD(x) \
- ({ int *__l, __b; \
+ ({ int *__l, __b, __c, __d; \
asm ("call 1f\n\t" \
".subsection 1\n" \
"1:\tmovl (%%esp), %%ebx\n\t" \
@@ -91,7 +91,7 @@
"leal " #x "@tlsgd(%%ebx),%%eax\n\t" \
"call ___tls_get_addr@plt\n\t" \
"nop" \
- : "=a" (__l), "=&b" (__b)); \
+ : "=a" (__l), "=&b" (__b), "=&c" (__c), "=&d" (__d)); \
__l; })
# endif