summaryrefslogtreecommitdiffstats
path: root/src/mesa/sparc/sparc.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Fix and re-enable sparc normal asm.David Miller2009-02-271-3/+0
| | | | | | | | | | Fix a bug reported in 2003 :-) The output vector has 4 entries, not 3. Unconditionally emit .register directives. Signed-off-by: David S. Miller <[email protected]>
* mesa: Fix Sparc cliptest asm code and re-enable.David Miller2009-02-271-2/+2
| | | | | | | | | | | | | | Stop using register %g7 since that is used by the "system" (ie. the pthread implementation makes use of it). Also, the projection vector can be NULL and we shouldn't try to access it at all in _mesa_sparc_cliptest_points4_np(). ioquake3 would crash due to this bug. Finally, unconditionally emit the register directives and re-enable in _mesa_init_all_sparc_transform_asm(). Signed-off-by: David S. Miller <[email protected]>
* mesa: Resurrect SPARC asm code.David S. Miller2009-02-261-36/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This rewrites the sparc GLAPI code so that it's PIC friendly and works with all of the TLS/PTHREADS/64-bit/32-bit combinations properly. As a result we can turn SPARC asm back on. Currently it's only enabled on Linux, as that's the only place where I can test this stuff out. For the moment the cliptest SPARC asm routines are disabled as they are non-working. The problem is that they use register %g7 as a temporary which is where the threading libraries store the thread pointer on SPARC. I will fix that code up in a future change as it's a pretty important routine to optimize. Like x86 we do the runtime patch as a pthread once-invoked initializer in init_glapi_relocs(). Unlike x86, however, our GLAPI stubs on SPARC are just two instruction sequences that branch to a trampoline and put the GLAPI offset into a register. The trampoline is what we run-time patch. The stubs thus all look like: glFoo: ba __glapi_sparc_foo_stub sethi GLAPI_OFFSET(glFOO) * PTR_SIZE, %g3 This actually makes generate_entrypoint() a lot simpler on SPARC. For this case in generate_entrypoint() we generate stubs using a 'call' instead of the 'ba' above to make sure it can reach. In order to get a proper tail call going here, in the unpatched case, we do several tricks. To get the current PC, for example, we save the return address register into a temporary, do a call, save the return address register written by the call to another temporary, then restore the original return address register value. This is to avoid having to allocate a stack frame. This is necessary for PIC address formation. This new GLAPI scheme lets us get rid of the ugly SPARC GLAPI hacks in __glXInitialize() and one_time_init(). Signed-off-by: David S. Miller <[email protected]>
* mesa: Prefix main includes with dir to avoid conflicts.José Fonseca2008-09-211-1/+1
| | | | Eliminate a couple of differences with gallium-0.2
* Fix build when DEBUG is defined but DEBUG_MATH is not.Ian Romanick2006-10-161-1/+1
| | | | | | A couple places attempted to call _math_test_all_*_functions when DEBUG was defined. These routines only exist when DEBUG_MATH is defined.
* Fix SPARC assembly for 64-bitIan Romanick2005-07-281-6/+2
| | | | | | | | | | | | | | - The test for whether or not we're building for 64-bit is '#ifdef __arch64__'. This appears to be correct on both Linux and Solaris. - The test for Solaris is now '#if defined(SVR4) || defined(__SVR4) || defined(__svr4__)'. GCC 3.4.0 has all three defined on Solaris 9. - Enables assembly language clip routines. - Fixes to make GLSL code build on Solaris. - Update gl_SPARC_asm.py.
* silence warning, minor clean-upBrian Paul2004-11-221-7/+4
|
* applied SPARC patch (freedesktop bug 1898)Brian Paul2004-11-221-1/+1
|
* Re-enable SPARC assembly on sunos5-gcc platform.Ian Romanick2004-06-261-5/+2
|
* fix __sparc_v9__ test to exclude linux (bug 852204)Brian Paul2003-12-011-1/+1
|
* Further makefile clean-up, concentrated on the x86 assembly files.Brian Paul2003-06-101-2/+10
|
* disable normal xform code - see bug 673938Brian Paul2003-02-081-3/+6
|
* fix patching offsets (Sven Panne) (patch 544637)Brian Paul2002-07-121-3/+3
|
* Disabled SPARC cliptest functions for now. See bug report 544665.Brian Paul2002-04-171-4/+8
|
* remove dead vertex assemblyKeith Whitwell2002-04-091-2/+1
|
* Remove dependency on MESA sources from gl* filesdavem692001-06-061-4/+5
| | | | | | | in SPARC glapi optimizations by moving the icache flush into the glapi_sparc.S file. Brian, how is this?
* SPARC normal tnl optimizations.davem692001-06-061-1/+35
|
* Sparc optimized GLAPI dispatch table.davem692001-06-051-2/+31
|
* updated copyrightBrian Paul2001-05-231-3/+3
|
* SPARC assembly optimizations from David Miller.Brian Paul2001-05-231-0/+109