diff options
Diffstat (limited to 'src/mesa/x86')
-rw-r--r-- | src/mesa/x86/3dnow_normal.S | 6 | ||||
-rw-r--r-- | src/mesa/x86/3dnow_xform1.S | 5 | ||||
-rw-r--r-- | src/mesa/x86/3dnow_xform2.S | 4 | ||||
-rw-r--r-- | src/mesa/x86/3dnow_xform3.S | 4 | ||||
-rw-r--r-- | src/mesa/x86/3dnow_xform4.S | 4 | ||||
-rw-r--r-- | src/mesa/x86/assyntax.h | 24 | ||||
-rw-r--r-- | src/mesa/x86/common_x86.c | 2 | ||||
-rw-r--r-- | src/mesa/x86/common_x86_asm.h | 4 | ||||
-rw-r--r-- | src/mesa/x86/mmx_blend.S | 5 | ||||
-rw-r--r-- | src/mesa/x86/sse_normal.S | 4 | ||||
-rw-r--r-- | src/mesa/x86/sse_xform1.S | 4 | ||||
-rw-r--r-- | src/mesa/x86/sse_xform2.S | 4 | ||||
-rw-r--r-- | src/mesa/x86/sse_xform3.S | 4 | ||||
-rw-r--r-- | src/mesa/x86/sse_xform4.S | 4 |
14 files changed, 61 insertions, 17 deletions
diff --git a/src/mesa/x86/3dnow_normal.S b/src/mesa/x86/3dnow_normal.S index 4c7740a025..4c1aca29cf 100644 --- a/src/mesa/x86/3dnow_normal.S +++ b/src/mesa/x86/3dnow_normal.S @@ -1,4 +1,4 @@ -/* $Id: 3dnow_normal.S,v 1.7 2004/04/08 08:10:37 alanh Exp $ */ +/* $Id: 3dnow_normal.S,v 1.8 2004/04/26 10:10:25 alanh Exp $ */ /* * Mesa 3-D graphics library @@ -28,6 +28,8 @@ * 3Dnow assembly code by Holger Waechtler */ +#ifdef USE_3DNOW_ASM + #include "matypes.h" #include "norm_args.h" @@ -834,3 +836,5 @@ LLBL (G3R_end): POP_L ( ESI ) POP_L ( EDI ) RET + +#endif diff --git a/src/mesa/x86/3dnow_xform1.S b/src/mesa/x86/3dnow_xform1.S index 9957676ee9..f551f56626 100644 --- a/src/mesa/x86/3dnow_xform1.S +++ b/src/mesa/x86/3dnow_xform1.S @@ -1,4 +1,4 @@ -/* $Id: 3dnow_xform1.S,v 1.1 2001/03/29 06:46:16 gareth Exp $ */ +/* $Id: 3dnow_xform1.S,v 1.2 2004/04/26 10:10:25 alanh Exp $ */ /* * Mesa 3-D graphics library @@ -24,6 +24,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#ifdef USE_3DNOW_ASM #include "matypes.h" #include "xform_args.h" @@ -421,3 +422,5 @@ LLBL( G3TP3R_3 ): POP_L ( EDI ) POP_L ( ESI ) RET + +#endif diff --git a/src/mesa/x86/3dnow_xform2.S b/src/mesa/x86/3dnow_xform2.S index cb3a8531df..cbe3a19bfa 100644 --- a/src/mesa/x86/3dnow_xform2.S +++ b/src/mesa/x86/3dnow_xform2.S @@ -1,4 +1,4 @@ -/* $Id: 3dnow_xform2.S,v 1.1 2001/03/29 06:46:16 gareth Exp $ */ +/* $Id: 3dnow_xform2.S,v 1.2 2004/04/26 10:10:25 alanh Exp $ */ /* * Mesa 3-D graphics library @@ -24,6 +24,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#ifdef USE_3DNOW_ASM #include "matypes.h" #include "xform_args.h" @@ -462,3 +463,4 @@ LLBL( G3TPIR_4 ): POP_L ( EDI ) POP_L ( ESI ) RET +#endif diff --git a/src/mesa/x86/3dnow_xform3.S b/src/mesa/x86/3dnow_xform3.S index c1e3bf99d3..2822794fb2 100644 --- a/src/mesa/x86/3dnow_xform3.S +++ b/src/mesa/x86/3dnow_xform3.S @@ -1,4 +1,4 @@ -/* $Id: 3dnow_xform3.S,v 1.2 2001/10/22 01:21:16 brianp Exp $ */ +/* $Id: 3dnow_xform3.S,v 1.3 2004/04/26 10:10:25 alanh Exp $ */ /* * Mesa 3-D graphics library @@ -24,6 +24,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#ifdef USE_3DNOW_ASM #include "matypes.h" #include "xform_args.h" @@ -546,3 +547,4 @@ LLBL( G3TPIR_2 ): POP_L ( EDI ) POP_L ( ESI ) RET +#endif diff --git a/src/mesa/x86/3dnow_xform4.S b/src/mesa/x86/3dnow_xform4.S index 0336b708bc..6692529a10 100644 --- a/src/mesa/x86/3dnow_xform4.S +++ b/src/mesa/x86/3dnow_xform4.S @@ -1,4 +1,4 @@ -/* $Id: 3dnow_xform4.S,v 1.2 2001/10/22 01:21:16 brianp Exp $ */ +/* $Id: 3dnow_xform4.S,v 1.3 2004/04/26 10:10:25 alanh Exp $ */ /* * Mesa 3-D graphics library @@ -24,6 +24,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#ifdef USE_3DNOW_ASM #include "matypes.h" #include "xform_args.h" @@ -555,3 +556,4 @@ LLBL( G3TPIR_2 ): POP_L ( EDI ) POP_L ( ESI ) RET +#endif diff --git a/src/mesa/x86/assyntax.h b/src/mesa/x86/assyntax.h index 62d079f253..16aaf900f7 100644 --- a/src/mesa/x86/assyntax.h +++ b/src/mesa/x86/assyntax.h @@ -274,9 +274,7 @@ #define GLOBL CHOICE(.globl, .globl, .extern) #define GLOBAL GLOBL #define EXTERN GLOBL -/* -#define ALIGNTEXT32 CHOICE(.align 32, .align ARG2(5,0x90), .align 32) -*/ +#ifndef __AOUT__ #define ALIGNTEXT32 CHOICE(.align 32, .balign 32, .align 32) #define ALIGNTEXT16 CHOICE(.align 16, .balign 16, .align 16) #define ALIGNTEXT8 CHOICE(.align 8, .balign 8, .align 8) @@ -294,6 +292,26 @@ #define ALIGNDATA8 CHOICE(.align 8, .balign ARG2(8,0x0), .align 8) #define ALIGNDATA4 CHOICE(.align 4, .balign ARG2(4,0x0), .align 4) #define ALIGNDATA2 CHOICE(.align 2, .balign ARG2(2,0x0), .align 2) +#else +/* 'as -aout' on FreeBSD doesn't have .balign */ +#define ALIGNTEXT32 CHOICE(.align 32, .align ARG2(5,0x90), .align 32) +#define ALIGNTEXT16 CHOICE(.align 16, .align ARG2(4,0x90), .align 16) +#define ALIGNTEXT8 CHOICE(.align 8, .align ARG2(3,0x90), .align 8) +#define ALIGNTEXT4 CHOICE(.align 4, .align ARG2(2,0x90), .align 4) +#define ALIGNTEXT2 CHOICE(.align 2, .align ARG2(1,0x90), .align 2) +/* ALIGNTEXT4ifNOP is the same as ALIGNTEXT4, but only if the space is + * guaranteed to be filled with NOPs. Otherwise it does nothing. + */ +#define ALIGNTEXT32ifNOP CHOICE(.align 32, .align ARG2(5,0x90), /*can't do it*/) +#define ALIGNTEXT16ifNOP CHOICE(.align 16, .align ARG2(4,0x90), /*can't do it*/) +#define ALIGNTEXT8ifNOP CHOICE(.align 8, .align ARG2(3,0x90), /*can't do it*/) +#define ALIGNTEXT4ifNOP CHOICE(.align 4, .align ARG2(2,0x90), /*can't do it*/) +#define ALIGNDATA32 CHOICE(.align 32, .align ARG2(5,0x0), .align 32) +#define ALIGNDATA16 CHOICE(.align 16, .align ARG2(4,0x0), .align 16) +#define ALIGNDATA8 CHOICE(.align 8, .align ARG2(3,0x0), .align 8) +#define ALIGNDATA4 CHOICE(.align 4, .align ARG2(2,0x0), .align 4) +#define ALIGNDATA2 CHOICE(.align 2, .align ARG2(1,0x0), .align 2) +#endif /* __AOUT__ */ #define FILE(s) CHOICE(.file s, .file s, .file s) #define STRING(s) CHOICE(.string s, .asciz s, .asciz s) #define D_LONG CHOICE(.long, .long, .data4) diff --git a/src/mesa/x86/common_x86.c b/src/mesa/x86/common_x86.c index a8daada849..90fa7e48ff 100644 --- a/src/mesa/x86/common_x86.c +++ b/src/mesa/x86/common_x86.c @@ -28,7 +28,7 @@ * * Written by Holger Waechtler <holger@akaflieg.extern.tu-berlin.de> * Changed by Andre Werthmann <wertmann@cs.uni-potsdam.de> for using the - * new Katmai functions. + * new SSE functions. */ /* XXX these includes should probably go into imports.h or glheader.h */ diff --git a/src/mesa/x86/common_x86_asm.h b/src/mesa/x86/common_x86_asm.h index 83e1521ec8..a913bb1d09 100644 --- a/src/mesa/x86/common_x86_asm.h +++ b/src/mesa/x86/common_x86_asm.h @@ -1,4 +1,4 @@ -/* $Id: common_x86_asm.h,v 1.10 2002/10/29 20:28:57 brianp Exp $ */ +/* $Id: common_x86_asm.h,v 1.11 2004/04/26 10:10:25 alanh Exp $ */ /* * Mesa 3-D graphics library @@ -30,7 +30,7 @@ * * Written by Holger Waechtler <holger@akaflieg.extern.tu-berlin.de> * Changed by Andre Werthmann <wertmann@cs.uni-potsdam.de> for using the - * new Katmai functions + * new SSE functions * * Reimplemented by Gareth Hughes in a more * future-proof manner, based on code in the Linux kernel. diff --git a/src/mesa/x86/mmx_blend.S b/src/mesa/x86/mmx_blend.S index d049aa12be..f7326cdbe6 100644 --- a/src/mesa/x86/mmx_blend.S +++ b/src/mesa/x86/mmx_blend.S @@ -1,9 +1,11 @@ + /* * Written by José Fonseca <j_r_fonseca@yahoo.co.uk> */ -#include "matypes.h" +#ifdef USE_MMX_ASM +#include "matypes.h" /* integer multiplication - alpha plus one * @@ -361,3 +363,4 @@ TWO(MOVQ ( MM1, REGIND(rgba) )) #include "mmx_blendtmp.h" +#endif diff --git a/src/mesa/x86/sse_normal.S b/src/mesa/x86/sse_normal.S index 64bd38486c..ca545f496d 100644 --- a/src/mesa/x86/sse_normal.S +++ b/src/mesa/x86/sse_normal.S @@ -1,4 +1,4 @@ -/* $Id: sse_normal.S,v 1.3 2003/11/26 08:32:36 dborca Exp $ */ +/* $Id: sse_normal.S,v 1.4 2004/04/26 10:10:25 alanh Exp $ */ /* * Mesa 3-D graphics library @@ -31,6 +31,7 @@ * data (trans-matrix, src_vert, dst_vert) needs to be 16byte aligned ! */ +#ifdef USE_SSE_ASM #include "matypes.h" #include "norm_args.h" @@ -250,3 +251,4 @@ LLBL(K_G3TNNRR_finish): POP_L ( ESI ) RET #undef FRAME_OFFSET +#endif diff --git a/src/mesa/x86/sse_xform1.S b/src/mesa/x86/sse_xform1.S index 89c5567331..90768ba170 100644 --- a/src/mesa/x86/sse_xform1.S +++ b/src/mesa/x86/sse_xform1.S @@ -1,4 +1,4 @@ -/* $Id: sse_xform1.S,v 1.1 2001/03/29 06:46:27 gareth Exp $ */ +/* $Id: sse_xform1.S,v 1.2 2004/04/26 10:10:25 alanh Exp $ */ /* * Mesa 3-D graphics library @@ -31,6 +31,7 @@ * data (trans-matrix, src_vert, dst_vert) needs to be 16byte aligned ! */ +#ifdef USE_SSE_ASM #include "matypes.h" #include "xform_args.h" @@ -431,3 +432,4 @@ LLBL(K_GTP13P3DR_finish): POP_L( ESI ) RET #undef FRAME_OFFSET +#endif diff --git a/src/mesa/x86/sse_xform2.S b/src/mesa/x86/sse_xform2.S index f936088f91..49f9889f2e 100644 --- a/src/mesa/x86/sse_xform2.S +++ b/src/mesa/x86/sse_xform2.S @@ -1,4 +1,4 @@ -/* $Id: sse_xform2.S,v 1.1 2001/03/29 06:46:27 gareth Exp $ */ +/* $Id: sse_xform2.S,v 1.2 2004/04/26 10:10:25 alanh Exp $ */ /* * Mesa 3-D graphics library @@ -31,6 +31,7 @@ * data (trans-matrix, src_vert, dst_vert) needs to be 16byte aligned ! */ +#ifdef USE_SSE_ASM #include "matypes.h" #include "xform_args.h" @@ -450,3 +451,4 @@ LLBL(K_GTP23P3DR_finish): POP_L( ESI ) RET #undef FRAME_OFFSET +#endif diff --git a/src/mesa/x86/sse_xform3.S b/src/mesa/x86/sse_xform3.S index ff989c337d..f64baaccb7 100644 --- a/src/mesa/x86/sse_xform3.S +++ b/src/mesa/x86/sse_xform3.S @@ -1,4 +1,4 @@ -/* $Id: sse_xform3.S,v 1.1 2001/03/29 06:46:27 gareth Exp $ */ +/* $Id: sse_xform3.S,v 1.2 2004/04/26 10:10:25 alanh Exp $ */ /* * Mesa 3-D graphics library @@ -31,6 +31,7 @@ * data (trans-matrix, src_vert, dst_vert) needs to be 16byte aligned ! */ +#ifdef USE_SSE_ASM #include "matypes.h" #include "xform_args.h" @@ -496,3 +497,4 @@ LLBL(K_GTP3P3DR_finish): POP_L( ESI ) RET #undef FRAME_OFFSET +#endif diff --git a/src/mesa/x86/sse_xform4.S b/src/mesa/x86/sse_xform4.S index 13cb2a3ecb..5a64c9e31e 100644 --- a/src/mesa/x86/sse_xform4.S +++ b/src/mesa/x86/sse_xform4.S @@ -1,4 +1,4 @@ -/* $Id: sse_xform4.S,v 1.1 2001/03/29 06:46:27 gareth Exp $ */ +/* $Id: sse_xform4.S,v 1.2 2004/04/26 10:10:25 alanh Exp $ */ /* * Mesa 3-D graphics library @@ -24,6 +24,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#ifdef USE_SSE_ASM #include "matypes.h" #include "xform_args.h" @@ -224,3 +225,4 @@ LLBL( sse_identity_done ): POP_L( EDI ) POP_L( ESI ) RET +#endif |