Modify the generate assembly code to not use global registers %g2,
authorIan Romanick <idr@us.ibm.com>
Tue, 25 May 2004 16:51:56 +0000 (16:51 +0000)
committerIan Romanick <idr@us.ibm.com>
Tue, 25 May 2004 16:51:56 +0000 (16:51 +0000)
%g3, %g6, or %g7.  This should eliminate the warnings about global
registers used without a ".register" directive.

src/mesa/glapi/gl_SPARC_asm.py

index c895329492c95af1d53203005559f9159d486814..4fdb82df64033afae64dc10750c858b54b5a0234 100644 (file)
@@ -51,24 +51,24 @@ class PrintGenericStubs(gl_XML.FilterGLAPISpecBase):
                print '#if defined(__sparc_v9__) && !defined(__linux__)'
                print '#  define GL_STUB(fn,off)\t\t\t\t\\'
                print 'GLOBL_FN(fn) ; fn:\t\t\t\t\t\\'
-               print '\tsethi\t%hi(0x00000000), %g2 ;\t\t\t\\'
+               print '\tsethi\t%hi(0x00000000), %g4 ;\t\t\t\\'
                print '\tsethi\t%hi(0x00000000), %g1 ;\t\t\t\\'
-               print '\tor\t%g2, %lo(0x00000000), %g2 ;\t\t\\'
+               print '\tor\t%g4, %lo(0x00000000), %g4 ;\t\t\\'
                print '\tor\t%g1, %lo(0x00000000), %g1 ;\t\t\\'
-               print '\tsllx\t%g2, 32, %g2 ;\t\t\t\t\\'
-               print '\tldx\t[%g1 + %g2], %g1 ;\t\t\t\\'
-               print '\tsethi\t%hi(8 * off), %g2 ;\t\t\t\\'
-               print '\tor\t%g2, %lo(8 * off), %g2 ;\t\t\\'
-               print '\tldx\t[%g1 + %g2], %g3 ;\t\t\t\\'
-               print '\tjmpl\t%g3, %g0 ;\t\t\t\t\\'
+               print '\tsllx\t%g4, 32, %g4 ;\t\t\t\t\\'
+               print '\tldx\t[%g1 + %g4], %g1 ;\t\t\t\\'
+               print '\tsethi\t%hi(8 * off), %g4 ;\t\t\t\\'
+               print '\tor\t%g4, %lo(8 * off), %g4 ;\t\t\\'
+               print '\tldx\t[%g1 + %g4], %g5 ;\t\t\t\\'
+               print '\tjmpl\t%g5, %g0 ;\t\t\t\t\\'
                print '\tnop'
                print '#else'
                print '#  define GL_STUB(fn,off)\t\t\t\t\\'
                print 'GLOBL_FN(fn) ; fn:\t\t\t\t\t\\'
                print '\tsethi\t%hi(0x00000000), %g1 ;\t\t\t\\'
                print '\tld\t[%g1 + %lo(0x00000000)], %g1 ;\t\t\\'
-               print '\tld\t[%g1 + (4 * off)], %g3 ;\t\t\\'
-               print '\tjmpl\t%g3, %g0 ;\t\t\t\t\\'
+               print '\tld\t[%g1 + (4 * off)], %g5 ;\t\t\\'
+               print '\tjmpl\t%g5, %g0 ;\t\t\t\t\\'
                print '\tnop'
                print '#endif'
                print ''