浏览代码

applied SPARC patch (freedesktop bug 1898)

tags/unichrome-last-xinerama
Brian Paul 21 年前
父节点
当前提交
c247c7f66f

+ 1
- 1
src/mesa/glapi/gl_SPARC_asm.py 查看文件

@@ -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\\'

+ 3
- 3
src/mesa/glapi/glapi.c 查看文件

@@ -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);

+ 1
- 1
src/mesa/sparc/clip.S 查看文件

@@ -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

+ 917
- 917
src/mesa/sparc/glapi_sparc.S
文件差异内容过多而无法显示
查看文件


+ 2
- 2
src/mesa/sparc/norm.S 查看文件

@@ -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)

+ 1
- 1
src/mesa/sparc/sparc.c 查看文件

@@ -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]);

+ 1
- 1
src/mesa/sparc/sparc_matrix.h 查看文件

@@ -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

正在加载...
取消
保存