radeonsi: Better indexing of parameters in the pixel shader.
[mesa.git] / src / mapi / mapi / entry_x86_tls.h
index ea63490e1c782482d3693a2956b01fe0dbf1f01a..de918128eee576711794e9bc3ce0e470b8ae4dd4 100644 (file)
@@ -27,7 +27,6 @@
  */
 
 #include <string.h>
-#include "u_execmem.h"
 #include "u_macros.h"
 
 #ifdef __linux__
@@ -50,7 +49,7 @@ __asm__("x86_current_tls:\n\t"
         "1:\n\t"
         "popl %eax\n\t"
        "addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %eax\n\t"
-       "movl u_current_table@GOTNTPOFF(%eax), %eax\n\t"
+       "movl " ENTRY_CURRENT_TABLE "@GOTNTPOFF(%eax), %eax\n\t"
        "ret");
 
 #ifndef GLX_X86_READONLY_TEXT
@@ -80,15 +79,20 @@ __asm__(".balign 16\n"
 __asm__(".text");
 #endif /* GLX_X86_READONLY_TEXT */
 
+#ifndef MAPI_MODE_BRIDGE
+
+#include "u_execmem.h"
+
 extern unsigned long
 x86_current_tls();
 
+static char x86_entry_start[];
+static char x86_entry_end[];
+
 void
 entry_patch_public(void)
 {
 #ifndef GLX_X86_READONLY_TEXT
-   extern char x86_entry_start[];
-   extern char x86_entry_end[];
    char patch[8] = {
       0x65, 0xa1, 0x00, 0x00, 0x00, 0x00, /* movl %gs:0x0, %eax */
       0x90, 0x90                          /* nop's */
@@ -105,7 +109,6 @@ entry_patch_public(void)
 mapi_func
 entry_get_public(int slot)
 {
-   extern char x86_entry_start[];
    return (mapi_func) (x86_entry_start + slot * 16);
 }
 
@@ -139,3 +142,5 @@ entry_generate(int slot)
 
    return entry;
 }
+
+#endif /* MAPI_MODE_BRIDGE */