summaryrefslogtreecommitdiffstats
path: root/src/mesa/glapi/gl_x86-64_asm.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/glapi/gl_x86-64_asm.py')
-rw-r--r--src/mesa/glapi/gl_x86-64_asm.py22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/mesa/glapi/gl_x86-64_asm.py b/src/mesa/glapi/gl_x86-64_asm.py
index ea13d2ac522..eb440009b2f 100644
--- a/src/mesa/glapi/gl_x86-64_asm.py
+++ b/src/mesa/glapi/gl_x86-64_asm.py
@@ -236,10 +236,17 @@ class PrintGenericStubs(gl_XML.gl_print_base):
registers.append( ["%rbp", 0] )
+ if f.static_dispatch:
+ name = f.name
+ else:
+ name = "_dispatch_stub_%u" % (f.offset)
+
print '\t.p2align\t4,,15'
- print '\t.globl\tGL_PREFIX(%s)' % (f.name)
- print '\t.type\tGL_PREFIX(%s), @function' % (f.name)
- print 'GL_PREFIX(%s):' % (f.name)
+ print '\t.globl\tGL_PREFIX(%s)' % (name)
+ print '\t.type\tGL_PREFIX(%s), @function' % (name)
+ if not f.static_dispatch:
+ print '\tHIDDEN(GL_PREFIX(%s))' % (name)
+ print 'GL_PREFIX(%s):' % (name)
print '#if defined(GLX_USE_TLS)'
print '\tcall\t_x86_64_get_dispatch@PLT'
print '\tmovq\t%u(%%rax), %%r11' % (f.offset * 8)
@@ -273,7 +280,7 @@ class PrintGenericStubs(gl_XML.gl_print_base):
print '\tjmp\t*%r11'
print '#endif /* defined(GLX_USE_TLS) */'
- print '\t.size\tGL_PREFIX(%s), .-GL_PREFIX(%s)' % (f.name, f.name)
+ print '\t.size\tGL_PREFIX(%s), .-GL_PREFIX(%s)' % (name, name)
print ''
return
@@ -284,9 +291,10 @@ 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_PREFIX(%s) ; .set GL_PREFIX(%s), GL_PREFIX(%s)' % (n, n, f.name)
+ if f.static_dispatch:
+ for n in f.entry_points:
+ if n != f.name:
+ print '\t.globl GL_PREFIX(%s) ; .set GL_PREFIX(%s), GL_PREFIX(%s)' % (n, n, f.name)
return