summaryrefslogtreecommitdiffstats
path: root/src/mapi
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2014-09-25 17:28:20 -0700
committerMatt Turner <[email protected]>2015-09-01 13:23:13 -0700
commite34834f059c68fc8cc6fc941bbde6d7a460595a7 (patch)
treee4f0c846e1d91c4b4f352cd3910f4d976583b97b /src/mapi
parentd351bab9c52e96026b2d49cdfd0dc68fdd9a499e (diff)
glapi: Inline x86_64_current_tls().
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mapi')
-rw-r--r--src/mapi/entry_x86-64_tls.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/mapi/entry_x86-64_tls.h b/src/mapi/entry_x86-64_tls.h
index 5c03b045606..38facccc870 100644
--- a/src/mapi/entry_x86-64_tls.h
+++ b/src/mapi/entry_x86-64_tls.h
@@ -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;