mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-29 08:11:08 +00:00
31cf39421b
* sysdeps/s390/fpu/bits/mathinline.h: Use __asm__ [__volatile__] instead of asm [volatile]. * sysdeps/s390/abort-instr.h: Likewise. * sysdeps/s390/atomic-machine.h: Likewise. * sysdeps/s390/bits/string.h: Likewise. * sysdeps/s390/dl-tls.h: Likewise. * sysdeps/s390/fpu/e_sqrt.c: Likewise. * sysdeps/s390/fpu/e_sqrtf.c: Likewise. * sysdeps/s390/fpu/e_sqrtl.c: Likewise. * sysdeps/s390/fpu/fesetround.c: Likewise. * sysdeps/s390/fpu/fpu_control.h: Likewise. * sysdeps/s390/fpu/s_fma.c: Likewise. * sysdeps/s390/fpu/s_fmaf.c: Likewise. * sysdeps/s390/memusage.h: Likewise. * sysdeps/s390/multiarch/ifunc-resolve.h: Likewise. * sysdeps/s390/nptl/pthread_spin_lock.c: Likewise. * sysdeps/s390/nptl/pthread_spin_trylock.c: Likewise. * sysdeps/s390/nptl/pthread_spin_unlock.c: Likewise. * sysdeps/s390/nptl/tls.h: Likewise. * sysdeps/s390/s390-32/__longjmp.c: Likewise. * sysdeps/s390/s390-32/backtrace.c: Likewise. * sysdeps/s390/s390-32/dl-machine.h: Likewise. * sysdeps/s390/s390-32/multiarch/memcmp.c: Likewise. * sysdeps/s390/s390-32/stackguard-macros.h: Likewise. * sysdeps/s390/s390-32/tls-macros.h: Likewise. * sysdeps/s390/s390-64/__longjmp.c: Likewise. * sysdeps/s390/s390-64/backtrace.c: Likewise. * sysdeps/s390/s390-64/dl-machine.h: Likewise. * sysdeps/s390/s390-64/iso-8859-1_cp037_z900.c: Likewise. * sysdeps/s390/s390-64/multiarch/memcmp.c: Likewise. * sysdeps/s390/s390-64/stackguard-macros.h: Likewise. * sysdeps/s390/s390-64/tls-macros.h: Likewise. * sysdeps/s390/s390-64/utf16-utf32-z9.c: Likewise. * sysdeps/s390/s390-64/utf8-utf16-z9.c: Likewise. * sysdeps/s390/s390-64/utf8-utf32-z9.c: Likewise. * sysdeps/unix/sysv/linux/s390/brk.c: Likewise. * sysdeps/unix/sysv/linux/s390/elision-trylock.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/____longjmp_chk.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/____longjmp_chk.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/s390/sysconf.c: Likewise.
89 lines
3.5 KiB
C
89 lines
3.5 KiB
C
#define TLS_LE(x) \
|
|
({ unsigned long __offset; \
|
|
__asm__ ("bras %0,1f\n" \
|
|
"0:\t.quad " #x "@ntpoff\n" \
|
|
"1:\tlg %0,0(%0)" \
|
|
: "=a" (__offset) : : "cc" ); \
|
|
(int *) (__builtin_thread_pointer() + __offset); })
|
|
|
|
#ifdef PIC
|
|
# define TLS_IE(x) \
|
|
({ unsigned long __offset, __got; \
|
|
__asm__ ("bras %0,0f\n\t" \
|
|
".quad " #x "@gotntpoff\n" \
|
|
"0:\tlarl %1,_GLOBAL_OFFSET_TABLE_\n\t" \
|
|
"lg %0,0(%0)\n\t" \
|
|
"lg %0,0(%0,%1):tls_load:" #x "\n" \
|
|
: "=&a" (__offset), "=&a" (__got) : : "cc" ); \
|
|
(int *) (__builtin_thread_pointer() + __offset); })
|
|
#else
|
|
# define TLS_IE(x) \
|
|
({ unsigned long __offset; \
|
|
__asm__ ("bras %0,1f\n" \
|
|
"0:\t.quad " #x "@indntpoff\n" \
|
|
"1:\t lg %0,0(%0)\n\t" \
|
|
"lg %0,0(%0):tls_load:" #x \
|
|
: "=&a" (__offset) : : "cc" ); \
|
|
(int *) (__builtin_thread_pointer() + __offset); })
|
|
#endif
|
|
|
|
#ifdef PIC
|
|
# define TLS_LD(x) \
|
|
({ unsigned long __offset, __save12; \
|
|
__asm__ ("bras %0,1f\n" \
|
|
"0:\t.quad " #x "@tlsldm\n\t" \
|
|
".quad " #x "@dtpoff\n" \
|
|
"1:\tlgr %1,%%r12\n\t" \
|
|
"larl %%r12,_GLOBAL_OFFSET_TABLE_\n\t" \
|
|
"lg %%r2,0(%0)\n\t" \
|
|
"brasl %%r14,__tls_get_offset@plt:tls_ldcall:" #x "\n\t" \
|
|
"lg %0,8(%0)\n\t" \
|
|
"algr %0,%%r2\n\t" \
|
|
"lgr %%r12,%1" \
|
|
: "=&a" (__offset), "=&a" (__save12) \
|
|
: : "cc", "0", "1", "2", "3", "4", "5", "14" ); \
|
|
(int *) (__builtin_thread_pointer() + __offset); })
|
|
#else
|
|
# define TLS_LD(x) \
|
|
({ unsigned long __offset; \
|
|
__asm__ ("bras %0,1f\n" \
|
|
"0:\t.quad " #x "@tlsldm\n\t" \
|
|
".quad " #x "@dtpoff\n" \
|
|
"1:\tlarl %%r12,_GLOBAL_OFFSET_TABLE_\n\t" \
|
|
"lg %%r2,0(%0)\n\t" \
|
|
"brasl %%r14,__tls_get_offset@plt:tls_ldcall:" #x "\n\t" \
|
|
"lg %0,8(%0)\n\t" \
|
|
"algr %0,%%r2" \
|
|
: "=&a" (__offset) \
|
|
: : "cc", "0", "1", "2", "3", "4", "5", "12", "14" ); \
|
|
(int *) (__builtin_thread_pointer() + __offset); })
|
|
#endif
|
|
|
|
#ifdef PIC
|
|
# define TLS_GD(x) \
|
|
({ unsigned long __offset, __save12; \
|
|
__asm__ ("bras %0,1f\n" \
|
|
"0:\t.quad " #x "@tlsgd\n" \
|
|
"1:\tlgr %1,%%r12\n\t" \
|
|
"larl %%r12,_GLOBAL_OFFSET_TABLE_\n\t" \
|
|
"lg %%r2,0(%0)\n\t" \
|
|
"brasl %%r14,__tls_get_offset@plt:tls_gdcall:" #x "\n\t" \
|
|
"lgr %0,%%r2\n\t" \
|
|
"lgr %%r12,%1" \
|
|
: "=&a" (__offset), "=&a" (__save12) \
|
|
: : "cc", "0", "1", "2", "3", "4", "5", "14" ); \
|
|
(int *) (__builtin_thread_pointer() + __offset); })
|
|
#else
|
|
# define TLS_GD(x) \
|
|
({ unsigned long __offset; \
|
|
__asm__ ("bras %0,1f\n" \
|
|
"0:\t.quad " #x "@tlsgd\n" \
|
|
"1:\tlarl %%r12,_GLOBAL_OFFSET_TABLE_\n\t" \
|
|
"lg %%r2,0(%0)\n\t" \
|
|
"brasl %%r14,__tls_get_offset@plt:tls_gdcall:" #x "\n\t" \
|
|
"lgr %0,%%r2" \
|
|
: "=&a" (__offset) \
|
|
: : "cc", "0", "1", "2", "3", "4", "5", "12", "14" ); \
|
|
(int *) (__builtin_thread_pointer() + __offset); })
|
|
#endif
|