diff options
author | Jouk <joukj@tarantella.(none)> | 2007-07-25 10:16:11 +0200 |
---|---|---|
committer | Jouk <joukj@tarantella.(none)> | 2007-07-25 10:16:11 +0200 |
commit | eb9a5b6d5127858b01ec12672c999e7d25cd7aed (patch) | |
tree | 91c0302c4d007ddcd0c42fbb8d8de71bf23d3914 /src/mesa/glapi/gl_x86_asm.py | |
parent | 55f8b7053065ce88296608071feed6f9540f6c0d (diff) | |
parent | 03ec41ddc51e539c989a546f33d22daa2af69095 (diff) |
Merge branch 'master' of git+ssh://[email protected]/git/mesa/mesa
Diffstat (limited to 'src/mesa/glapi/gl_x86_asm.py')
-rw-r--r-- | src/mesa/glapi/gl_x86_asm.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/mesa/glapi/gl_x86_asm.py b/src/mesa/glapi/gl_x86_asm.py index 650331a0c5a..403e87261b0 100644 --- a/src/mesa/glapi/gl_x86_asm.py +++ b/src/mesa/glapi/gl_x86_asm.py @@ -82,12 +82,18 @@ class PrintGenericStubs(gl_XML.gl_print_base): print '' print '#ifdef GLX_USE_TLS' print '' + print '#ifdef GLX_X86_READONLY_TEXT' + print '# define CTX_INSNS MOV_L(GS:(EAX), EAX)' + print '#else' + print '# define CTX_INSNS NOP /* Pad for init_glapi_relocs() */' + print '#endif' + print '' print '# define GL_STUB(fn,off,fn_alt)\t\t\t\\' print 'ALIGNTEXT16;\t\t\t\t\t\t\\' print 'GLOBL_FN(GL_PREFIX(fn, fn_alt));\t\t\t\\' print 'GL_PREFIX(fn, fn_alt):\t\t\t\t\t\\' print '\tCALL(_x86_get_dispatch) ;\t\t\t\\' - print '\tNOP ;\t\t\t\t\t\t\\' + print '\tCTX_INSNS ; \\' print '\tJMP(GL_OFFSET(off))' print '' print '#elif defined(PTHREADS)' @@ -138,7 +144,10 @@ class PrintGenericStubs(gl_XML.gl_print_base): print '\tHIDDEN(GLNAME(_x86_get_dispatch))' print 'ALIGNTEXT16' print 'GLNAME(_x86_get_dispatch):' - print '\tmovl\t%gs:_glapi_tls_Dispatch@NTPOFF, %eax' + print '\tcall 1f' + print '1:\tpopl %eax' + print '\taddl $_GLOBAL_OFFSET_TABLE_+[.-1b], %eax' + print '\tmovl _glapi_tls_Dispatch@GOTNTPOFF(%eax), %eax' print '\tret' print '' print '#elif defined(PTHREADS)' @@ -158,7 +167,7 @@ class PrintGenericStubs(gl_XML.gl_print_base): print '#endif' print '' - print '#if defined( GLX_USE_TLS )' + print '#if defined( GLX_USE_TLS ) && !defined( GLX_X86_READONLY_TEXT )' print '\t\t.section\twtext, "awx", @progbits' print '#endif /* defined( GLX_USE_TLS ) */' |