Fix NASM problems, remove static var in SSE detection code. (Josh Vanderhoof)

This commit is contained in:
Brian Paul 2002-06-11 01:26:58 +00:00
parent 4fe2f3f1a0
commit 35883ceb93
5 changed files with 773 additions and 766 deletions

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
# $Id: glx86asm.py,v 1.5 2002/04/02 16:18:20 brianp Exp $
# $Id: glx86asm.py,v 1.6 2002/06/11 01:26:58 brianp Exp $
# Mesa 3-D graphics library
# Version: 4.1
@ -59,6 +59,8 @@ def PrintHead():
print '#endif'
print ''
print ''
print 'EXTERN GLNAME(_glapi_Dispatch)'
print ''
return
#enddef
@ -106,7 +108,7 @@ def EmitFunction(name, returnType, argTypeList, argNameList, alias, offset):
print 'ALIGNTEXT16'
print "GLOBL_FN(GL_PREFIX(%s))" % (name)
print "GL_PREFIX(%s):" % (name)
print '\tMOV_L(GLNAME(_glapi_Dispatch), EAX)'
print '\tMOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX)'
print "\tJMP(GL_OFFSET(_gloffset_%s))" % (dispatchName)
print ''

View File

@ -1,4 +1,4 @@
/* $Id: assyntax.h,v 1.20 2002/06/06 15:33:37 brianp Exp $ */
/* $Id: assyntax.h,v 1.21 2002/06/11 01:26:58 brianp Exp $ */
#ifndef __ASSYNTAX_H__
#define __ASSYNTAX_H__
@ -964,11 +964,11 @@ SECTION _DATA public align=16 class=DATA use32 flat
#endif
#if defined(Lynx) || (defined(SYSV) || defined(SVR4)) \
|| (defined(linux) || defined(__OS2ELF__)) && defined(__ELF__) \
|| (defined(__linux__) || defined(__OS2ELF__)) && defined(__ELF__) \
|| defined(__FreeBSD__) && __FreeBSD__ >= 3
#define GLNAME(a) a
#else
#define GLNAME(a) _ ## a
#define GLNAME(a) CONCAT(_, a)
#endif
/*
@ -1077,7 +1077,7 @@ SECTION _DATA public align=16 class=DATA use32 flat
#define VARINDIRECT(var) var
/* Use register contents as jump/call target: */
#define CODEPTR(reg) reg
#define CODEPTR(reg) P_(reg)
/*
* Redefine assembler commands
@ -1201,7 +1201,7 @@ SECTION _DATA public align=16 class=DATA use32 flat
#define JS(a) js NEAR a
#define JZ(a) jz NEAR a
#define JMP(a) jmp a
#define JMPF(s,a) jmpf
#define JMPF(s,a) jmp far s:a
#define LAHF lahf
#define LAR(a, b) lar b, a
#define LEA_L(a, b) lea P_(b), P_(a)

View File

@ -1,4 +1,4 @@
/* $Id: common_x86_asm.S,v 1.9 2002/06/04 21:29:20 brianp Exp $ */
/* $Id: common_x86_asm.S,v 1.10 2002/06/11 01:26:58 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -64,11 +64,6 @@
GLNAME( found_intel ): STRING( "Genuine Intel processor found\n\0" )
GLNAME( found_amd ): STRING( "Authentic AMD processor found\n\0" )
#ifdef USE_SSE_ASM
GLNAME( sse_test_dummy ):
D_LONG 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000
#endif
SEG_TEXT
@ -202,7 +197,15 @@ GLNAME( _mesa_test_os_sse_exception_support ):
LDMXCSR ( REGOFF( -8, EBP ) )
XORPS ( XMM0, XMM0 )
MOVUPS ( CONTENT( GLNAME( sse_test_dummy ) ), XMM1 )
PUSH_L ( CONST( 0x3f800000 ) )
PUSH_L ( CONST( 0x3f800000 ) )
PUSH_L ( CONST( 0x3f800000 ) )
PUSH_L ( CONST( 0x3f800000 ) )
MOVUPS ( REGIND( ESP ), XMM1 )
ADD_L ( CONST( 32 ), ESP )
DIVPS ( XMM0, XMM1 )

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
/* $Id: x86_cliptest.S,v 1.9 2002/03/07 21:40:08 brianp Exp $ */
/* $Id: x86_cliptest.S,v 1.10 2002/06/11 01:26:58 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -95,7 +95,7 @@ clip_table:
* EBP: temp2
*/
#if defined(__ELF__) && defined(__PIC__) && !defined(ELFPIC)
#if defined(__ELF__) && defined(__PIC__) && defined(GNU_ASSEMBLER) && !defined(ELFPIC)
#define ELFPIC
#endif