diff options
author | Zou Nan hai <nanhai.zou@intel.com> | 2007-07-04 10:52:35 +0800 |
---|---|---|
committer | Zou Nan hai <nanhai.zou@intel.com> | 2007-07-04 10:52:35 +0800 |
commit | fb9ee9b323bff93973a39560b2bc007aace4bddd (patch) | |
tree | 05e1e72e8f4d321cde2c48b8518e6d9736c680dd /src/mesa/glapi/gl_x86_asm.py | |
parent | 285b326c606e9b2f90e4fe177b15b3fa23239b86 (diff) | |
parent | 7ff4359a3be1278b26950f96ab23014a667af838 (diff) |
Merge branch 'master' of git+ssh://znh@git.freedesktop.org/git/mesa/mesa into 965-glsl
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 650331a0c5..403e87261b 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 ) */' |