applied SPARC patch (freedesktop bug 1898)

This commit is contained in:
Brian Paul 2004-11-22 19:27:40 +00:00
parent 263317d00a
commit c247c7f66f
7 changed files with 926 additions and 926 deletions

View File

@ -48,7 +48,7 @@ class PrintGenericStubs(gl_XML.FilterGLAPISpecBase):
print ''
print '#define GLOBL_FN(x) .globl x ; .type x,#function'
print ''
print '#if defined(__sparc_v9__) && !defined(__linux__)'
print '#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))'
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), %g4 ;\t\t\t\\'

View File

@ -634,7 +634,7 @@ generate_entrypoint(GLuint functionOffset)
return code;
#elif defined(USE_SPARC_ASM)
#if defined(__sparc_v9__) && !defined(__linux__)
#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
static const unsigned int insn_template[] = {
0x05000000, /* sethi %uhi(_glapi_Dispatch), %g2 */
0x03000000, /* sethi %hi(_glapi_Dispatch), %g1 */
@ -662,7 +662,7 @@ generate_entrypoint(GLuint functionOffset)
if (code) {
memcpy(code, insn_template, sizeof(insn_template));
#if defined(__sparc_v9__) && !defined(__linux__)
#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
code[0] |= (glapi_addr >> (32 + 10));
code[1] |= ((glapi_addr & 0xffffffff) >> 10);
__glapi_sparc_icache_flush(&code[0]);
@ -705,7 +705,7 @@ fill_in_entrypoint_offset(void *entrypoint, GLuint offset)
/* XXX this hasn't been tested! */
unsigned int *code = (unsigned int *) entrypoint;
#if defined(__sparc_v9__) && !defined(__linux__)
#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
code[6] = 0x05000000; /* sethi %hi(8 * glapioffset), %g2 */
code[7] = 0x8410a000; /* or %g2, %lo(8 * glapioffset), %g2 */
code[6] |= ((offset * 8) >> 10);

View File

@ -2,7 +2,7 @@
* Clip testing in SPARC assembly
*/
#if defined(__sparc_v9__) && !defined(__linux__)
#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
#define LDPTR ldx
#define V4F_DATA 0x00
#define V4F_START 0x08

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
/* $Id: norm.S,v 1.3 2004/04/26 10:10:25 alanh Exp $ */
/* $Id: norm.S,v 1.4 2004/11/22 19:27:40 brianp Exp $ */
#include "sparc_matrix.h"
@ -10,7 +10,7 @@
.text
#if defined(__sparc_v9__) && !defined(__linux__)
#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
#define STACK_VAR_OFF (2047 + (8 * 16))
#else
#define STACK_VAR_OFF (4 * 16)

View File

@ -165,7 +165,7 @@ void _mesa_init_sparc_glapi_relocs(void)
disp_addr = (unsigned long) &_glapi_Dispatch;
while (insn_ptr < end_ptr) {
#if defined(__sparc_v9__) && !defined(__linux__)
#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
insn_ptr[0] |= (disp_addr >> (32 + 10));
insn_ptr[1] |= ((disp_addr & 0xffffffff) >> 10);
__glapi_sparc_icache_flush(&insn_ptr[0]);

View File

@ -5,7 +5,7 @@
#ifndef _SPARC_MATRIX_H
#define _SPARC_MATRIX_H
#if defined(__sparc_v9__) && !defined(__linux__)
#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
#define LDPTR ldx
#define MAT_M 0x00
#define MAT_INV 0x08