glapi: Inline x86_64_current_tls().
authorMatt Turner <mattst88@gmail.com>
Fri, 26 Sep 2014 00:28:20 +0000 (17:28 -0700)
committerMatt Turner <mattst88@gmail.com>
Tue, 1 Sep 2015 20:23:13 +0000 (13:23 -0700)
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mapi/entry_x86-64_tls.h

index 5c03b045606c484547dd1c7624ce7e57498fb431..38facccc870a1f7b5bae8e82bcc978b5d5897188 100644 (file)
@@ -46,13 +46,6 @@ __asm__(".text\n"
 
 #ifndef MAPI_MODE_BRIDGE
 
-__asm__("x86_64_current_tls:\n\t"
-       "movq " ENTRY_CURRENT_TABLE "@GOTTPOFF(%rip), %rax\n\t"
-       "ret");
-
-extern unsigned long
-x86_64_current_tls();
-
 #include <string.h>
 #include "u_execmem.h"
 
@@ -90,7 +83,8 @@ entry_generate(int slot)
    char *code;
    mapi_func entry;
 
-   addr = x86_64_current_tls();
+   __asm__("movq " ENTRY_CURRENT_TABLE "@GOTTPOFF(%%rip), %0"
+           : "=r" (addr));
    if ((addr >> 32) != 0xffffffff)
       return NULL;
    addr &= 0xffffffff;