diff options
author | Brian Paul <[email protected]> | 2005-11-02 20:59:37 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2005-11-02 20:59:37 +0000 |
commit | 60031ace7504a78af75284d66a2d0b4ed9a92b73 (patch) | |
tree | ec3eaa88431fbd78a6578c98b7241049bd80e7bc /src/mesa/glapi/gl_x86-64_asm.py | |
parent | 90ebb581e60d29bd565ad4d8a49e642de7b0ce5d (diff) |
implement USE_MGL_NAMESPACE for x86-64 dispatch code (Mark Bolstad)
Diffstat (limited to 'src/mesa/glapi/gl_x86-64_asm.py')
-rw-r--r-- | src/mesa/glapi/gl_x86-64_asm.py | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/mesa/glapi/gl_x86-64_asm.py b/src/mesa/glapi/gl_x86-64_asm.py index 86c3f575af4..1bfe3db591a 100644 --- a/src/mesa/glapi/gl_x86-64_asm.py +++ b/src/mesa/glapi/gl_x86-64_asm.py @@ -120,6 +120,9 @@ class PrintGenericStubs(gl_XML.gl_print_base): print "/* If we build with gcc's -fvisibility=hidden flag, we'll need to change" print " * the symbol visibility mode to 'default'." print ' */' + print '' + print '#include "assyntax.h"' + print '' print '#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303' print '# pragma GCC visibility push(default)' print '# define HIDDEN(x) .hidden x' @@ -127,6 +130,12 @@ class PrintGenericStubs(gl_XML.gl_print_base): print '# define HIDDEN(x)' print '#endif' print '' + print '# if defined(USE_MGL_NAMESPACE)' + print '# define GL_PREFIX(n) GLNAME(CONCAT(mgl,n))' + print '# else' + print '# define GL_PREFIX(n) GLNAME(CONCAT(gl,n))' + print '# endif' + print '' print '#if defined(PTHREADS) || defined(USE_XTHREADS) || defined(SOLARIS_THREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS)' print '# define THREADS' print '#endif' @@ -224,9 +233,9 @@ class PrintGenericStubs(gl_XML.gl_print_base): print '\t.p2align\t4,,15' - print '\t.globl\tgl%s' % (f.name) - print '\t.type\tgl%s, @function' % (f.name) - print 'gl%s:' % (f.name) + print '\t.globl\tGL_PREFIX(%s)' % (f.name) + print '\t.type\tGL_PREFIX(%s), @function' % (f.name) + print 'GL_PREFIX(%s):' % (f.name) print '#if defined(GLX_USE_TLS)' print '\tcall\t_x86_64_get_dispatch@PLT' print '\tmovq\t%u(%%rax), %%r11' % (f.offset * 8) @@ -260,7 +269,7 @@ class PrintGenericStubs(gl_XML.gl_print_base): print '\tjmp\t*%r11' print '#endif /* defined(GLX_USE_TLS) */' - print '\t.size\tgl%s, .-gl%s' % (f.name, f.name) + print '\t.size\tGL_PREFIX(%s), .-GL_PREFIX(%s)' % (f.name, f.name) print '' return @@ -273,7 +282,7 @@ class PrintGenericStubs(gl_XML.gl_print_base): for f in api.functionIterateByOffset(): for n in f.entry_points: if n != f.name: - print '\t.globl gl%s ; .set gl%s, gl%s' % (n, n, f.name) + print '\t.globl GL_PREFIX(%s) ; .set GL_PREFIX(%s), GL_PREFIX(%s)' % (n, n, f.name) return |