fix __sparc_v9__ test to exclude linux (bug 852204)

This commit is contained in:
Brian Paul
2003-12-01 22:40:26 +00:00
parent 06cfb44564
commit 9a90cd40c6
7 changed files with 934 additions and 932 deletions

View File

@@ -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 */
}