* the correct heap.
*
* Check the texobj base address corresponds to the MemBlock
- * range. Check the texobj size (recalculate???) fits within
+ * range. Check the texobj size (recalculate?) fits within
* the MemBlock.
*
* Count the number of texobj's using this heap.
flag = 0;
if ( debug != NULL ) {
while( control->string != NULL ) {
- if ( strstr( debug, control->string ) != NULL ) {
+ if ( !strcmp( debug, "all" ) ||
+ strstr( debug, control->string ) != NULL ) {
flag |= control->flag;
}
#include <unistd.h> /* for usleep() */
#include <sched.h> /* for sched_yield() */
+#ifdef linux
+#include <sched.h> /* for sched_yield() */
+#endif
+
#define DO_USLEEP(nr) \
do { \
if (0) fprintf(stderr, "%s: usleep for %u\n", __FUNCTION__, nr ); \
static void TAG(emit)(GLcontext *ctx, GLuint start, GLuint end)
{
ffbContextPtr fmesa = FFB_CONTEXT(ctx);
+#if defined(VB_DEBUG) || (IND & (FFB_VB_XYZ_BIT | FFB_VB_RGBA_BIT))
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
+#endif
#if (IND & (FFB_VB_RGBA_BIT))
GLfloat (*col0)[4];
GLuint col0_stride;
+#if defined(i386) || defined(__i386__)
/* From linux kernel i386 header files, copes with odd sizes better
* than COPY_DWORDS would:
*/
: "memory");
return (to);
}
+#else
+/* Allow compilation on other architectures */
+#define __memcpy memcpy
+#endif
/* Upload an image from mesa's internal copy.
*/
}
}
+#if defined(i386) || defined(__i386__)
/* From linux kernel i386 header files, copes with odd sizes better
* than COPY_DWORDS would:
*/
: "memory");
return (to);
}
-
+#else
+/* Allow compilation on other architectures */
+#define __memcpy memcpy
+#endif
/* Upload an image from mesa's internal copy.
*/
#ifndef MGALIB_INC
#define MGALIB_INC
-#include <inttypes.h>
#include "drm.h"
#include "mga_drm.h"
#include "dri_util.h"
#define PTEX_FALLBACK() FALLBACK(ctx, MGA_FALLBACK_TEXTURE, 1)
-#define INTERP_VERTEX setup_tab[MGA_CONTEXT(ctx)->SetupIndex].interp
-#define COPY_PV_VERTEX setup_tab[MGA_CONTEXT(ctx)->SetupIndex].copy_pv
+#define INTERP_VERTEX setup_tab[mmesa->SetupIndex].interp
+#define COPY_PV_VERTEX setup_tab[mmesa->SetupIndex].copy_pv
/***********************************************************************
*/
#include <errno.h>
+#define STANDALONE_MMIO
#include "r128_context.h"
#include "r128_state.h"
#include "r128_ioctl.h"
if ( R128_DEBUG & DEBUG_VERBOSE_API ) {
fprintf( stderr, "\n********************************\n" );
fprintf( stderr, "\n%s( %p )\n\n",
- __FUNCTION__, rmesa->glCtx );
+ __FUNCTION__, (void *)rmesa->glCtx );
fflush( stderr );
}
if ( R128_DEBUG & DEBUG_VERBOSE_API ) {
fprintf( stderr, "\n%s( %p ): page=%d\n\n",
- __FUNCTION__, rmesa->glCtx, rmesa->sarea->pfCurrentPage );
+ __FUNCTION__, (void *)rmesa->glCtx, rmesa->sarea->pfCurrentPage );
}
FLUSH_BATCH( rmesa );
#ifdef GLX_DIRECT_RENDERING
-#include <inttypes.h>
#include "tnl/t_vertex.h"
#include "drm.h"
#include "radeon_drm.h"
#include "imports.h"
#include "context.h"
+#define STANDALONE_MMIO
#include "r200_screen.h"
#include "r200_context.h"
#include "r200_ioctl.h"
return NULL;
}
+ RADEONMMIO = screen->mmio.map;
+
screen->status.handle = dri_priv->statusHandle;
screen->status.size = dri_priv->statusSize;
if ( drmMap( sPriv->fd,
ret
GLOBL( _x86_MultiTexCoord2f_2_end )
+#if defined(USE_SSE_ASM)
/**
* This can be used as a template for either Color3fv (when the color
* target is also a 3f) or Normal3fv.
movlps %xmm0, (%eax)
ret
GLOBL( _sse_MultiTexCoord2f_2_end )
+#endif
#ifdef GLX_DIRECT_RENDERING
-#include <inttypes.h>
#include "dri_util.h"
#include "drm.h"
#include "radeon_drm.h"
#include "radeon_tcl.h"
#include "radeon_sanity.h"
+#define STANDALONE_MMIO
#include "radeon_macros.h" /* for INREG() */
#include "vblank.h"
else
ret = -EINVAL;
-#ifndef __alpha__
if ( ret == -EINVAL ) {
frame = INREG( RADEON_LAST_FRAME_REG );
ret = 0;
}
-#endif
if ( ret ) {
fprintf( stderr, "%s: drm_radeon_getparam_t: %d\n", __FUNCTION__, ret );
exit(1);
} else
ret = -EINVAL;
-#ifndef __alpha__
if ( ret == -EINVAL ) {
clear = INREG( RADEON_LAST_CLEAR_REG );
ret = 0;
}
-#endif
if ( ret ) {
fprintf( stderr, "%s: drm_radeon_getparam_t: %d\n", __FUNCTION__, ret );
exit(1);
#include "glheader.h"
#include "imports.h"
+#define STANDALONE_MMIO
#include "radeon_context.h"
#include "radeon_screen.h"
#include "radeon_macros.h"
texObj->DriverData = t;
if ( t != NULL ) {
if ( RADEON_DEBUG & DEBUG_TEXTURE ) {
- fprintf( stderr, "%s( %p, %p )\n", __FUNCTION__, texObj, t );
+ fprintf( stderr, "%s( %p, %p )\n", __FUNCTION__, (void *)texObj, (void *)t );
}
/* Initialize non-image-dependent parts of the state:
struct gl_texture_object *texObj )
{
if ( RADEON_DEBUG & (DEBUG_STATE|DEBUG_TEXTURE) ) {
- fprintf( stderr, "%s( %p ) unit=%d\n", __FUNCTION__, texObj,
+ fprintf( stderr, "%s( %p ) unit=%d\n", __FUNCTION__, (void *)texObj,
ctx->Texture.CurrentUnit );
}
driTextureObject * t = (driTextureObject *) texObj->DriverData;
if ( RADEON_DEBUG & (DEBUG_STATE|DEBUG_TEXTURE) ) {
- fprintf( stderr, "%s( %p (target = %s) )\n", __FUNCTION__, texObj,
+ fprintf( stderr, "%s( %p (target = %s) )\n", __FUNCTION__, (void *)texObj,
_mesa_lookup_enum_by_nr( texObj->Target ) );
}
radeonDestroyTexObj( radeonContextPtr rmesa, radeonTexObjPtr t )
{
if ( RADEON_DEBUG & DEBUG_TEXTURE ) {
- fprintf( stderr, "%s( %p, %p )\n", __FUNCTION__, t, t->base.tObj );
+ fprintf( stderr, "%s( %p, %p )\n", __FUNCTION__, (void *)t, (void *)t->base.tObj );
}
if ( rmesa != NULL ) {
if ( RADEON_DEBUG & DEBUG_TEXTURE ) {
fprintf( stderr, "%s( %p, %p ) level/width/height/face = %d/%d/%d/%u\n",
- __FUNCTION__, t, t->base.tObj, level, width, height, face );
+ __FUNCTION__, (void *)t, (void *)t->base.tObj, level, width, height, face );
}
ASSERT(face < 6);
if ( RADEON_DEBUG & (DEBUG_TEXTURE|DEBUG_IOCTL) ) {
fprintf( stderr, "%s( %p, %p ) sz=%d lvls=%d-%d\n", __FUNCTION__,
- rmesa->glCtx, t->base.tObj, t->base.totalSize,
+ (void *)rmesa->glCtx, (void *)t->base.tObj, t->base.totalSize,
t->base.firstLevel, t->base.lastLevel );
}
|| (texUnit->_Current != NULL) );
if ( RADEON_DEBUG & DEBUG_TEXTURE ) {
- fprintf( stderr, "%s( %p, %d )\n", __FUNCTION__, ctx, unit );
+ fprintf( stderr, "%s( %p, %d )\n", __FUNCTION__, (void *)ctx, unit );
}
/* Set the texture environment state. Isn't this nice and clean?
for (i = 0 ; i < nrverts; i++) {
if (RADEON_DEBUG & DEBUG_VERTS) {
int j;
- fprintf(stderr, "re-emit vertex %d to %p\n", i, rmesa->vb.dmaptr);
+ fprintf(stderr, "re-emit vertex %d to %p\n", i, (void *)rmesa->vb.dmaptr);
if (RADEON_DEBUG & DEBUG_VERBOSE)
for (j = 0 ; j < rmesa->vb.vertex_size; j++)
fprintf(stderr, "\t%08x/%f\n", *(int*)&tmp[i][j], tmp[i][j]);
ret
GLOBL( _x86_MultiTexCoord2f_2_end )
+#if defined(USE_SSE_ASM)
/**
* This can be used as a template for either Color3fv (when the color
* target is also a 3f) or Normal3fv.
movlps %xmm0, (%eax)
ret
GLOBL( _sse_MultiTexCoord2f_2_end )
+#endif
memset( &smesa->zClearPacket, 0, sizeof(ENGPACKET) );
smesa->zClearPacket.dwSrcPitch = (z_depth == 2) ? 0x80000000 : 0xf0000000;
- smesa->zClearPacket.dwDestBaseAddr = (GLint)(addr -
+ smesa->zClearPacket.dwDestBaseAddr = (unsigned long)(addr -
(unsigned long)smesa->FbBase);
smesa->zClearPacket.wDestPitch = width2;
smesa->zClearPacket.stdwDestPos.wY = 0;
addr = (char *)ALIGNMENT( (unsigned long)addr, DRAW_BUFFER_HW_ALIGNMENT );
smesa->backbuffer = addr;
- smesa->backOffset = (GLint)(addr - (unsigned long)smesa->FbBase);
+ smesa->backOffset = (unsigned long)(addr - (unsigned long)smesa->FbBase);
smesa->backPitch = width2 * depth;
memset ( &smesa->cbClearPacket, 0, sizeof(ENGPACKET) );
tdfxInitDriver( __DRIscreenPrivate *sPriv )
{
if ( TDFX_DEBUG & DEBUG_VERBOSE_DRI ) {
- fprintf( stderr, "%s( %p )\n", __FUNCTION__, sPriv );
+ fprintf( stderr, "%s( %p )\n", __FUNCTION__, (void *)sPriv );
}
/* Check the DRI externsion version */
GLframebuffer *mesaBuffer;
if ( TDFX_DEBUG & DEBUG_VERBOSE_DRI ) {
- fprintf( stderr, "%s( %p )\n", __FUNCTION__, driDrawPriv );
+ fprintf( stderr, "%s( %p )\n", __FUNCTION__, (void *)driDrawPriv );
}
mesaBuffer = (GLframebuffer *) driDrawPriv->driverPrivate;
*
* Recall that x and y are screen coordinates.
*/
-#define GET_FB_DATA(ReadParamsp, type, x, y) \
- (((x) < (ReadParamsp)->firstWrappedX) \
- ? (((type *)((ReadParamsp)->lfbPtr)) \
- [(y) * ((ReadParamsp)->LFBStrideInElts) \
- + (x)]) \
- : (((type *)((ReadParamsp)->lfbWrapPtr)) \
- [((y)) * ((ReadParamsp)->LFBStrideInElts) \
- + ((x) - (ReadParamsp)->firstWrappedX)]))
#define GET_ORDINARY_FB_DATA(ReadParamsp, type, x, y) \
(((type *)((ReadParamsp)->lfbPtr)) \
[(y) * ((ReadParamsp)->LFBStrideInElts) \
(((type *)((ReadParamsp)->lfbWrapPtr)) \
[((y)) * ((ReadParamsp)->LFBStrideInElts) \
+ ((x) - (ReadParamsp)->firstWrappedX)])
-#define PUT_FB_DATA(ReadParamsp, type, x, y, value) \
- (GET_FB_DATA(ReadParamsp, type, x, y) = (type)(value))
+#define GET_FB_DATA(ReadParamsp, type, x, y) \
+ (((x) < (ReadParamsp)->firstWrappedX) \
+ ? GET_ORDINARY_FB_DATA(ReadParamsp, type, x, y) \
+ : GET_WRAPPED_FB_DATA(ReadParamsp, type, x, y))
#define PUT_ORDINARY_FB_DATA(ReadParamsp, type, x, y, value) \
(GET_ORDINARY_FB_DATA(ReadParamsp, type, x, y) = (type)(value))
#define PUT_WRAPPED_FB_DATA(ReadParamsp, type, x, y, value) \
(GET_WRAPPED_FB_DATA(ReadParamsp, type, x, y) = (type)(value))
+#define PUT_FB_DATA(ReadParamsp, type, x, y, value) \
+ do { \
+ if ((x) < (ReadParamsp)->firstWrappedX) \
+ PUT_ORDINARY_FB_DATA(ReadParamsp, type, x, y, value); \
+ else \
+ PUT_WRAPPED_FB_DATA(ReadParamsp, type, x, y, value); \
+ } while (0)
static void
tdfxDDWriteDepthSpan(GLcontext * ctx,
tdfxTexInfo *ti = TDFX_TEXTURE_DATA(tObj);
if (MESA_VERBOSE & VERBOSE_DRIVER) {
- fprintf(stderr, "fxmesa: %s(%p (%d))\n", __FUNCTION__, tObj, tObj->Name);
+ fprintf(stderr, "fxmesa: %s(%p (%d))\n", __FUNCTION__, (void *)tObj, tObj->Name);
}
/*
static GLboolean setup_grayscale( int client, XMesaVisual v,
XMesaBuffer buffer, XMesaColormap cmap )
{
+ (void) DitherValues; /* Muffle compiler */
+
if (GET_VISUAL_DEPTH(v)<4 || GET_VISUAL_DEPTH(v)>16) {
return GL_FALSE;
}
*** USE_IEEE: Determine if we're using IEEE floating point
***/
#if defined(__i386__) || defined(__386__) || defined(__sparc__) || \
- defined(__s390x__) || defined(__powerpc__) || defined(__AMD64__) || \
- defined(__ia64__) || \
- ( defined(__alpha__) && ( defined(__IEEE_FLOAT) || !defined(VMS) ) )
+ defined(__s390x__) || defined(__powerpc__) || \
+ defined(__AMD64__) || defined(__amd64__) || \
+ defined(ia64) || defined(__ia64__) || \
+ (defined(__alpha__) && (defined(__IEEE_FLOAT) || !defined(VMS)))
#define USE_IEEE
#define IEEE_ONE 0x3f800000
#endif
const GLint dstRowStride = bpt * dstWidth;
const GLubyte *srcA, *srcB;
GLubyte *dst;
- GLint row, colStride;
-
- colStride = (srcWidth == dstWidth) ? 1 : 2;
+ GLint row;
/* Compute src and dst pointers, skipping any border */
srcA = srcPtr + border * ((srcWidth + 1) * bpt);
#include "m_debug.h"
#include "m_debug_util.h"
+#ifdef __UNIXOS2__
+/* The linker doesn't like empty files */
+static char dummy;
+#endif
+
#ifdef DEBUG /* This code only used for debugging */
static clip_func *clip_tab[2] = {
#include "m_debug_util.h"
+#ifdef __UNIXOS2__
+/* The linker doesn't like empty files */
+static char dummy;
+#endif
+
#ifdef DEBUG /* This code only used for debugging */
#include "m_debug.h"
#include "m_debug_util.h"
+#ifdef __UNIXOS2__
+/* The linker doesn't like empty files */
+static char dummy;
+#endif
+
#ifdef DEBUG /* This code only used for debugging */
/*
* This is called only once. It initializes several tables with pointers
* to optimized transformation functions. This is where we can test for
- * AMD 3Dnow! capability, Intel Katmai, etc. and hook in the right code.
+ * AMD 3Dnow! capability, Intel SSE, etc. and hook in the right code.
*/
void
_math_init_transformation( void )
#define VEC_SIZE_3 7
#define VEC_SIZE_4 15
+#ifdef SVR4
+ /* Solaris requires this for 64-bit. */
+ .register %g2, #scratch
+ .register %g3, #scratch
+ .register %g7, #scratch
+#endif
+
.text
.align 64
-/* $Id: norm.S,v 1.2 2003/12/01 22:40:51 brianp Exp $ */
+/* $Id: norm.S,v 1.3 2004/04/26 10:10:25 alanh Exp $ */
#include "sparc_matrix.h"
+#ifdef SVR4
+ /* Solaris requires this for 64-bit. */
+ .register %g2, #scratch
+ .register %g3, #scratch
+#endif
+
.text
#if defined(__sparc_v9__) && !defined(__linux__)
-/* $Id: xform.S,v 1.2 2001/06/05 23:54:01 davem69 Exp $ */
+/* $Id: xform.S,v 1.3 2004/04/26 10:10:25 alanh Exp $ */
/* TODO
*
#include "sparc_matrix.h"
+#ifdef SVR4
+ /* Solaris requires this for 64-bit. */
+ .register %g2, #scratch
+ .register %g3, #scratch
+#endif
+
.text
.align 64
void _tnl_EndList( GLcontext *ctx )
{
- TNLcontext *tnl = TNL_CONTEXT(ctx);
- assert(tnl->save.vertex_size == 0);
+ assert(TNL_CONTEXT(ctx)->save.vertex_size == 0);
}
void _tnl_BeginCallList( GLcontext *ctx, GLuint list )
*/
-#if (IDX & LIGHT_TWOSIDE)
+#if IDX & LIGHT_TWOSIDE
# define NR_SIDES 2
#else
# define NR_SIDES 1
GLfloat sum[2][3];
struct gl_light *light;
- if ( IDX & LIGHT_MATERIAL ) {
- update_materials( ctx, store );
- sumA[0] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE][3];
+#if IDX & LIGHT_MATERIAL
+ update_materials( ctx, store );
+ sumA[0] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE][3];
#if IDX & LIGHT_TWOSIDE
- sumA[1] = ctx->Light.Material.Attrib[MAT_ATTRIB_BACK_DIFFUSE][3];
+ sumA[1] = ctx->Light.Material.Attrib[MAT_ATTRIB_BACK_DIFFUSE][3];
+#endif
#endif
- }
COPY_3V(sum[0], base[0]);
- if ( IDX & LIGHT_TWOSIDE )
- COPY_3V(sum[1], base[1]);
+#if IDX & LIGHT_TWOSIDE
+ COPY_3V(sum[1], base[1]);
+#endif
/* Add contribution from each enabled light source */
foreach (light, &ctx->Light.EnabledList) {
GLfloat n_dot_VP;
- if ( IDX & LIGHT_MATERIAL )
- update_materials( ctx, store );
+#if IDX & LIGHT_MATERIAL
+ update_materials( ctx, store );
+#endif
/* No attenuation, so incoporate _MatAmbient into base color.
*/
- if ( j == 0 || (IDX & LIGHT_MATERIAL) ) {
+#if !(IDX & LIGHT_MATERIAL)
+ if ( j == 0 )
+#endif
+ {
COPY_3V(base[0], light->_MatAmbient[0]);
ACC_3V(base[0], ctx->Light._BaseColor[0] );
base[0][3] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE][3];
GLfloat sum[2][3];
- if ( IDX & LIGHT_MATERIAL ) {
- update_materials( ctx, store );
+#if IDX & LIGHT_MATERIAL
+ update_materials( ctx, store );
- sumA[0] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE][3];
+ sumA[0] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE][3];
#if IDX & LIGHT_TWOSIDE
- sumA[1] = ctx->Light.Material.Attrib[MAT_ATTRIB_BACK_DIFFUSE][3];
+ sumA[1] = ctx->Light.Material.Attrib[MAT_ATTRIB_BACK_DIFFUSE][3];
+#endif
#endif
- }
COPY_3V(sum[0], ctx->Light._BaseColor[0]);
GLuint side = 0;
struct gl_light *light;
- if ( IDX & LIGHT_MATERIAL )
- update_materials( ctx, store );
+#if IDX & LIGHT_MATERIAL
+ update_materials( ctx, store );
+#endif
diffuse[0] = specular[0] = 0.0F;
- if ( IDX & LIGHT_TWOSIDE ) {
+#if IDX & LIGHT_TWOSIDE
diffuse[1] = specular[1] = 0.0F;
- }
+#endif
/* Accumulate diffuse and specular from each light source */
foreach (light, &ctx->Light.EnabledList) {
-/* $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
* 3Dnow assembly code by Holger Waechtler
*/
+#ifdef USE_3DNOW_ASM
+
#include "matypes.h"
#include "norm_args.h"
POP_L ( ESI )
POP_L ( EDI )
RET
+
+#endif
-/* $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
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+#ifdef USE_3DNOW_ASM
#include "matypes.h"
#include "xform_args.h"
POP_L ( EDI )
POP_L ( ESI )
RET
+
+#endif
-/* $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
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+#ifdef USE_3DNOW_ASM
#include "matypes.h"
#include "xform_args.h"
POP_L ( EDI )
POP_L ( ESI )
RET
+#endif
-/* $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
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+#ifdef USE_3DNOW_ASM
#include "matypes.h"
#include "xform_args.h"
POP_L ( EDI )
POP_L ( ESI )
RET
+#endif
-/* $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
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+#ifdef USE_3DNOW_ASM
#include "matypes.h"
#include "xform_args.h"
POP_L ( EDI )
POP_L ( ESI )
RET
+#endif
#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)
#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)
*
* 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 */
-/* $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
*
* 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.
+
/*
* 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
*
#include "mmx_blendtmp.h"
+#endif
-/* $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
* data (trans-matrix, src_vert, dst_vert) needs to be 16byte aligned !
*/
+#ifdef USE_SSE_ASM
#include "matypes.h"
#include "norm_args.h"
POP_L ( ESI )
RET
#undef FRAME_OFFSET
+#endif
-/* $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
* data (trans-matrix, src_vert, dst_vert) needs to be 16byte aligned !
*/
+#ifdef USE_SSE_ASM
#include "matypes.h"
#include "xform_args.h"
POP_L( ESI )
RET
#undef FRAME_OFFSET
+#endif
-/* $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
* data (trans-matrix, src_vert, dst_vert) needs to be 16byte aligned !
*/
+#ifdef USE_SSE_ASM
#include "matypes.h"
#include "xform_args.h"
POP_L( ESI )
RET
#undef FRAME_OFFSET
+#endif
-/* $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
* data (trans-matrix, src_vert, dst_vert) needs to be 16byte aligned !
*/
+#ifdef USE_SSE_ASM
#include "matypes.h"
#include "xform_args.h"
POP_L( ESI )
RET
#undef FRAME_OFFSET
+#endif
-/* $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
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+#ifdef USE_SSE_ASM
#include "matypes.h"
#include "xform_args.h"
POP_L( EDI )
POP_L( ESI )
RET
+#endif