diff --git a/src/mapi/entry.c b/src/mapi/entry.c index 5405336f9dd..b862175dff6 100644 --- a/src/mapi/entry.c +++ b/src/mapi/entry.c @@ -36,9 +36,6 @@ #define _U_STRINGIFY(x) #x #define U_STRINGIFY(x) _U_STRINGIFY(x) -/* define macros for use by assembly dispatchers */ -#define ENTRY_CURRENT_TABLE U_STRINGIFY(_glapi_tls_Dispatch) - /* REALLY_INITIAL_EXEC implies __GLIBC__ */ #if defined(USE_X86_ASM) && defined(REALLY_INITIAL_EXEC) #include "entry_x86_tls.h" diff --git a/src/mapi/entry_ppc64le_tls.h b/src/mapi/entry_ppc64le_tls.h index e09a1178a06..d204dd919a1 100644 --- a/src/mapi/entry_ppc64le_tls.h +++ b/src/mapi/entry_ppc64le_tls.h @@ -55,9 +55,9 @@ __asm__(".text\n" " .localentry " func ", .-" func "\n\t" #define STUB_ASM_CODE(slot) \ - " addis 11, 2, " ENTRY_CURRENT_TABLE "@got@tprel@ha\n\t" \ - " ld 11, " ENTRY_CURRENT_TABLE "@got@tprel@l(11)\n\t" \ - " add 11, 11," ENTRY_CURRENT_TABLE "@tls\n\t" \ + " addis 11, 2, _glapi_tls_Dispatch@got@tprel@ha\n\t" \ + " ld 11, _glapi_tls_Dispatch@got@tprel@l(11)\n\t" \ + " add 11, 11,_glapi_tls_Dispatch@tls\n\t" \ " ld 11, 0(11)\n\t" \ " ld 12, " slot "*8(11)\n\t" \ " mtctr 12\n\t" \ @@ -88,8 +88,8 @@ entry_get_public(int slot) __asm__(".text\n"); __asm__("ppc64le_dispatch_tls:\n\t" - " addis 3, 2, " ENTRY_CURRENT_TABLE "@got@tprel@ha\n\t" - " ld 3, " ENTRY_CURRENT_TABLE "@got@tprel@l(3)\n\t" + " addis 3, 2, _glapi_tls_Dispatch@got@tprel@ha\n\t" + " ld 3, _glapi_tls_Dispatch@got@tprel@l(3)\n\t" " blr\n" ); diff --git a/src/mapi/entry_x86-64_tls.h b/src/mapi/entry_x86-64_tls.h index aebe4cf4a3f..f2fea518963 100644 --- a/src/mapi/entry_x86-64_tls.h +++ b/src/mapi/entry_x86-64_tls.h @@ -51,7 +51,7 @@ __asm__(".text\n" #define STUB_ASM_CODE(slot) \ ENDBR \ - "movq " ENTRY_CURRENT_TABLE "@GOTTPOFF(%rip), %rax\n\t" \ + "movq _glapi_tls_Dispatch@GOTTPOFF(%rip), %rax\n\t" \ "movq %fs:(%rax), %r11\n\t" \ "jmp *(8 * " slot ")(%r11)" @@ -59,7 +59,7 @@ __asm__(".text\n" #define STUB_ASM_CODE(slot) \ ENDBR \ - "movq " ENTRY_CURRENT_TABLE "@GOTTPOFF(%rip), %rax\n\t" \ + "movq _glapi_tls_Dispatch@GOTTPOFF(%rip), %rax\n\t" \ "movl %fs:(%rax), %r11d\n\t" \ "movl 4*" slot "(%r11d), %r11d\n\t" \ "jmp *%r11" @@ -121,7 +121,7 @@ entry_generate(int slot) char *code; mapi_func entry; - __asm__("movq " ENTRY_CURRENT_TABLE "@GOTTPOFF(%%rip), %0" + __asm__("movq _glapi_tls_Dispatch@GOTTPOFF(%%rip), %0" : "=r" (addr)); if ((addr >> 32) != 0xffffffff) return NULL; diff --git a/src/mapi/entry_x86_tls.h b/src/mapi/entry_x86_tls.h index bdaa97374ba..9829968c0a9 100644 --- a/src/mapi/entry_x86_tls.h +++ b/src/mapi/entry_x86_tls.h @@ -48,7 +48,7 @@ __asm__("x86_current_tls:\n\t" "1:\n\t" "popl %eax\n\t" "addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %eax\n\t" - "movl " ENTRY_CURRENT_TABLE "@GOTNTPOFF(%eax), %eax\n\t" + "movl _glapi_tls_Dispatch@GOTNTPOFF(%eax), %eax\n\t" "ret"); #ifndef GLX_X86_READONLY_TEXT @@ -70,7 +70,7 @@ __asm__(".balign 16\n" "1:\n\t" \ "popl %eax\n\t" \ "addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %eax\n\t" \ - "movl " ENTRY_CURRENT_TABLE "@GOTNTPOFF(%eax), %eax\n\t" \ + "movl _glapi_tls_Dispatch@GOTNTPOFF(%eax), %eax\n\t" \ "movl %gs:(%eax), %eax\n\t" \ "jmp *(4 * " slot ")(%eax)"