1 /* Include sysdeps/powerpc/tls-macros.h for __TLS_CALL_CLOBBERS */
2 #include_next "tls-macros.h"
4 /* PowerPC32 Local Exec TLS access. */
7 asm ("addi %0,2," #x "@tprel" \
11 /* PowerPC32 Initial Exec TLS access. */
14 asm ("bcl 20,31,1f\n1:\t" \
16 "addis %0,%0,_GLOBAL_OFFSET_TABLE_-1b@ha\n\t" \
17 "addi %0,%0,_GLOBAL_OFFSET_TABLE_-1b@l\n\t" \
18 "lwz %0," #x "@got@tprel(%0)\n\t" \
19 "add %0,%0," #x "@tls" \
24 /* PowerPC32 Local Dynamic TLS access. */
27 asm ("bcl 20,31,1f\n1:\t" \
29 "addis 3,3,_GLOBAL_OFFSET_TABLE_-1b@ha\n\t" \
30 "addi 3,3,_GLOBAL_OFFSET_TABLE_-1b@l\n\t" \
31 "addi 3,3," #x "@got@tlsld\n\t" \
32 "bl __tls_get_addr@plt\n\t" \
33 "addi %0,3," #x "@dtprel" \
35 : "3", __TLS_CALL_CLOBBERS); \
38 /* PowerPC32 General Dynamic TLS access. */
40 ({ register int *__result __asm__ ("r3"); \
41 asm ("bcl 20,31,1f\n1:\t" \
43 "addis 3,3,_GLOBAL_OFFSET_TABLE_-1b@ha\n\t" \
44 "addi 3,3,_GLOBAL_OFFSET_TABLE_-1b@l\n\t" \
45 "addi 3,3," #x "@got@tlsgd\n\t" \
46 "bl __tls_get_addr@plt" \
48 : __TLS_CALL_CLOBBERS); \