fix __sparc_v9__ test to exclude linux (bug 852204)
This commit is contained in:
@@ -559,7 +559,7 @@ generate_entrypoint(GLuint functionOffset)
|
||||
return code;
|
||||
#elif defined(USE_SPARC_ASM)
|
||||
|
||||
#ifdef __sparc_v9__
|
||||
#if defined(__sparc_v9__) && !defined(__linux__)
|
||||
static const unsigned int insn_template[] = {
|
||||
0x05000000, /* sethi %uhi(_glapi_Dispatch), %g2 */
|
||||
0x03000000, /* sethi %hi(_glapi_Dispatch), %g1 */
|
||||
@@ -587,7 +587,7 @@ generate_entrypoint(GLuint functionOffset)
|
||||
if (code) {
|
||||
memcpy(code, insn_template, sizeof(insn_template));
|
||||
|
||||
#ifdef __sparc_v9__
|
||||
#if defined(__sparc_v9__) && !defined(__linux__)
|
||||
code[0] |= (glapi_addr >> (32 + 10));
|
||||
code[1] |= ((glapi_addr & 0xffffffff) >> 10);
|
||||
__glapi_sparc_icache_flush(&code[0]);
|
||||
@@ -629,17 +629,17 @@ fill_in_entrypoint_offset(void *entrypoint, GLuint offset)
|
||||
|
||||
/* XXX this hasn't been tested! */
|
||||
unsigned int *code = (unsigned int *) entrypoint;
|
||||
#ifdef __sparc_v9__
|
||||
#if defined(__sparc_v9__) && !defined(__linux__)
|
||||
code[6] = 0x05000000; /* sethi %hi(8 * glapioffset), %g2 */
|
||||
code[7] = 0x8410a000; /* or %g2, %lo(8 * glapioffset), %g2 */
|
||||
code[6] |= ((offset * 8) >> 10);
|
||||
code[7] |= ((offset * 8) & ((1 << 10) - 1));
|
||||
__glapi_sparc_icache_flush(&code[6]);
|
||||
#else /* __sparc_v9__ */
|
||||
#else /* __sparc_v9__ && !linux */
|
||||
code[2] = 0xc6006000; /* ld [%g1 + %lo(4*glapioffset)], %g3 */
|
||||
code[2] |= (offset * 4);
|
||||
__glapi_sparc_icache_flush(&code[2]);
|
||||
#endif /* __sparc_v9__ */
|
||||
#endif /* __sparc_v9__ && !linux */
|
||||
|
||||
#endif /* USE_*_ASM */
|
||||
}
|
||||
|
@@ -1,11 +1,9 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
# $Id: glsparcasm.py,v 1.7 2002/01/03 16:33:59 brianp Exp $
|
||||
|
||||
# Mesa 3-D graphics library
|
||||
# Version: 4.1
|
||||
# Version: 5.1
|
||||
#
|
||||
# Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
# Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||
# copy of this software and associated documentation files (the "Software"),
|
||||
@@ -111,7 +109,7 @@ def EmitFunction(name, returnType, argTypeList, argNameList, alias, offset):
|
||||
print '.globl gl%s' % (name)
|
||||
print '.type gl%s,#function' % (name)
|
||||
print 'gl%s:' % (name)
|
||||
print '#ifdef __sparc_v9__'
|
||||
print '#if defined(__sparc_v9__) && !defined(__linux__)'
|
||||
print '\tsethi\t%hi(0x00000000), %g2'
|
||||
print '\tsethi\t%hi(0x00000000), %g1'
|
||||
print '\tor\t%g2, %lo(0x00000000), %g2'
|
||||
|
@@ -1,6 +1,8 @@
|
||||
/* $Id: clip.S,v 1.1 2001/05/23 14:27:03 brianp Exp $ */
|
||||
/*
|
||||
* Clip testing in SPARC assembly
|
||||
*/
|
||||
|
||||
#ifdef __sparc_v9__
|
||||
#if defined(__sparc_v9__) && !defined(__linux__)
|
||||
#define LDPTR ldx
|
||||
#define V4F_DATA 0x00
|
||||
#define V4F_START 0x08
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,10 +1,10 @@
|
||||
/* $Id: norm.S,v 1.1 2001/06/06 11:46:04 davem69 Exp $ */
|
||||
/* $Id: norm.S,v 1.2 2003/12/01 22:40:51 brianp Exp $ */
|
||||
|
||||
#include "sparc_matrix.h"
|
||||
|
||||
.text
|
||||
|
||||
#ifdef __sparc_v9__
|
||||
#if defined(__sparc_v9__) && !defined(__linux__)
|
||||
#define STACK_VAR_OFF (2047 + (8 * 16))
|
||||
#else
|
||||
#define STACK_VAR_OFF (4 * 16)
|
||||
|
@@ -165,7 +165,7 @@ void _mesa_init_sparc_glapi_relocs(void)
|
||||
disp_addr = (unsigned long) &_glapi_Dispatch;
|
||||
|
||||
while (insn_ptr < end_ptr) {
|
||||
#ifdef __sparc_v9__
|
||||
#if defined(__sparc_v9__) && !defined(__linux__)
|
||||
insn_ptr[0] |= (disp_addr >> (32 + 10));
|
||||
insn_ptr[1] |= ((disp_addr & 0xffffffff) >> 10);
|
||||
__glapi_sparc_icache_flush(&insn_ptr[0]);
|
||||
|
@@ -1,9 +1,11 @@
|
||||
/* $Id: sparc_matrix.h,v 1.3 2001/06/06 11:46:04 davem69 Exp $ */
|
||||
/*
|
||||
* SPARC assembly matrix code.
|
||||
*/
|
||||
|
||||
#ifndef _SPARC_MATRIX_H
|
||||
#define _SPARC_MATRIX_H
|
||||
|
||||
#ifdef __sparc_v9__
|
||||
#if defined(__sparc_v9__) && !defined(__linux__)
|
||||
#define LDPTR ldx
|
||||
#define MAT_M 0x00
|
||||
#define MAT_INV 0x08
|
||||
|
Reference in New Issue
Block a user