Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
#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"
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;