[Mesa-dev] [PATCH 3/3] mesa: remove _ASMAPI, ASMAPIP

Brian Paul brianp at vmware.com
Wed Mar 11 09:49:06 PDT 2015


---
 src/mesa/main/compiler.h    | 19 -------------------
 src/mesa/swrast/s_context.c |  2 +-
 src/mesa/x86/3dnow.c        |  6 +++---
 src/mesa/x86/common_x86.c   | 12 ++++++------
 src/mesa/x86/mmx.h          | 10 +++++-----
 src/mesa/x86/sse.c          | 20 ++++++++++----------
 src/mesa/x86/x86_xform.c    |  8 ++++----
 src/mesa/x86/x86_xform.h    | 30 +++++++++++++++---------------
 8 files changed, 44 insertions(+), 63 deletions(-)

diff --git a/src/mesa/main/compiler.h b/src/mesa/main/compiler.h
index 6fded88..b9f808e 100644
--- a/src/mesa/main/compiler.h
+++ b/src/mesa/main/compiler.h
@@ -113,25 +113,6 @@ extern "C" {
 #define LE32_TO_CPU( x )	CPU_TO_LE32( x )
 
 
-
-/**
- * Create a macro so that asm functions can be linked into compilers other
- * than GNU C
- */
-#ifndef _ASMAPI
-#if defined(_WIN32)
-#define _ASMAPI __cdecl
-#else
-#define _ASMAPI
-#endif
-#ifdef	PTR_DECL_IN_FRONT
-#define	_ASMAPIP * _ASMAPI
-#else
-#define	_ASMAPIP _ASMAPI *
-#endif
-#endif
-
-
 /**
  * LONGSTRING macro
  * gcc -pedantic warns about long string literals, LONGSTRING silences that.
diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c
index 51cc227..ecde292 100644
--- a/src/mesa/swrast/s_context.c
+++ b/src/mesa/swrast/s_context.c
@@ -409,7 +409,7 @@ _swrast_validate_point( struct gl_context *ctx, const SWvertex *v0 )
  * Called via swrast->BlendFunc.  Examine GL state to choose a blending
  * function, then call it.
  */
-static void _ASMAPI
+static void
 _swrast_validate_blend_func(struct gl_context *ctx, GLuint n, const GLubyte mask[],
                             GLvoid *src, const GLvoid *dst,
                             GLenum chanType )
diff --git a/src/mesa/x86/3dnow.c b/src/mesa/x86/3dnow.c
index c46cfbc..df7c64f 100644
--- a/src/mesa/x86/3dnow.c
+++ b/src/mesa/x86/3dnow.c
@@ -47,20 +47,20 @@ DECLARE_XFORM_GROUP( 3dnow, 3 )
 DECLARE_XFORM_GROUP( 3dnow, 4 )
 
 
-extern void _ASMAPI
+extern void
 _mesa_v16_3dnow_general_xform( GLfloat *first_vert,
 			       const GLfloat *m,
 			       const GLfloat *src,
 			       GLuint src_stride,
 			       GLuint count );
 
-extern void _ASMAPI
+extern void
 _mesa_3dnow_project_vertices( GLfloat *first,
 			      GLfloat *last,
 			      const GLfloat *m,
 			      GLuint stride );
 
-extern void _ASMAPI
+extern void
 _mesa_3dnow_project_clipped_vertices( GLfloat *first,
 				      GLfloat *last,
 				      const GLfloat *m,
diff --git a/src/mesa/x86/common_x86.c b/src/mesa/x86/common_x86.c
index 14b497d..86fbca9 100644
--- a/src/mesa/x86/common_x86.c
+++ b/src/mesa/x86/common_x86.c
@@ -68,12 +68,12 @@ static int detection_debug = GL_FALSE;
 
 /* No reason for this to be public.
  */
-extern GLuint	_ASMAPI _mesa_x86_has_cpuid(void);
-extern void	_ASMAPI _mesa_x86_cpuid(GLuint op, GLuint *reg_eax, GLuint *reg_ebx, GLuint *reg_ecx, GLuint *reg_edx);
-extern GLuint	_ASMAPI _mesa_x86_cpuid_eax(GLuint op);
-extern GLuint	_ASMAPI _mesa_x86_cpuid_ebx(GLuint op);
-extern GLuint	_ASMAPI _mesa_x86_cpuid_ecx(GLuint op);
-extern GLuint	_ASMAPI _mesa_x86_cpuid_edx(GLuint op);
+extern GLuint _mesa_x86_has_cpuid(void);
+extern void _mesa_x86_cpuid(GLuint op, GLuint *reg_eax, GLuint *reg_ebx, GLuint *reg_ecx, GLuint *reg_edx);
+extern GLuint _mesa_x86_cpuid_eax(GLuint op);
+extern GLuint _mesa_x86_cpuid_ebx(GLuint op);
+extern GLuint _mesa_x86_cpuid_ecx(GLuint op);
+extern GLuint _mesa_x86_cpuid_edx(GLuint op);
 
 
 #if defined(USE_SSE_ASM)
diff --git a/src/mesa/x86/mmx.h b/src/mesa/x86/mmx.h
index 8101cf8..0c35490 100644
--- a/src/mesa/x86/mmx.h
+++ b/src/mesa/x86/mmx.h
@@ -31,27 +31,27 @@
 
 struct gl_context;
 
-extern void _ASMAPI
+extern void
 _mesa_mmx_blend_transparency( struct gl_context *ctx, GLuint n, const GLubyte mask[],
                               GLvoid *rgba, const GLvoid *dest,
                               GLenum chanType );
 
-extern void _ASMAPI
+extern void
 _mesa_mmx_blend_add( struct gl_context *ctx, GLuint n, const GLubyte mask[],
                      GLvoid *rgba, const GLvoid *dest,
                      GLenum chanType );
 
-extern void _ASMAPI
+extern void
 _mesa_mmx_blend_min( struct gl_context *ctx, GLuint n, const GLubyte mask[],
                      GLvoid *rgba, const GLvoid *dest,
                      GLenum chanType );
 
-extern void _ASMAPI
+extern void
 _mesa_mmx_blend_max( struct gl_context *ctx, GLuint n, const GLubyte mask[],
                      GLvoid *rgba, const GLvoid *dest,
                      GLenum chanType );
 
-extern void _ASMAPI
+extern void
 _mesa_mmx_blend_modulate( struct gl_context *ctx, GLuint n, const GLubyte mask[],
                           GLvoid *rgba, const GLvoid *dest,
                           GLenum chanType );
diff --git a/src/mesa/x86/sse.c b/src/mesa/x86/sse.c
index 846184f..02fe18fa 100644
--- a/src/mesa/x86/sse.c
+++ b/src/mesa/x86/sse.c
@@ -46,35 +46,35 @@ DECLARE_XFORM_GROUP( sse, 3 )
 
 #if 1
 /* Some functions are not written in SSE-assembly, because the fpu ones are faster */
-extern void _ASMAPI _mesa_sse_transform_normals_no_rot( NORM_ARGS );
-extern void _ASMAPI _mesa_sse_transform_rescale_normals( NORM_ARGS );
-extern void _ASMAPI _mesa_sse_transform_rescale_normals_no_rot( NORM_ARGS );
+extern void _mesa_sse_transform_normals_no_rot( NORM_ARGS );
+extern void _mesa_sse_transform_rescale_normals( NORM_ARGS );
+extern void _mesa_sse_transform_rescale_normals_no_rot( NORM_ARGS );
 
-extern void _ASMAPI _mesa_sse_transform_points4_general( XFORM_ARGS );
-extern void _ASMAPI _mesa_sse_transform_points4_3d( XFORM_ARGS );
+extern void _mesa_sse_transform_points4_general( XFORM_ARGS );
+extern void _mesa_sse_transform_points4_3d( XFORM_ARGS );
 /* XXX this function segfaults, see below */
-extern void _ASMAPI _mesa_sse_transform_points4_identity( XFORM_ARGS );
+extern void _mesa_sse_transform_points4_identity( XFORM_ARGS );
 /* XXX this one works, see below */
-extern void _ASMAPI _mesa_x86_transform_points4_identity( XFORM_ARGS );
+extern void _mesa_x86_transform_points4_identity( XFORM_ARGS );
 #else
 DECLARE_NORM_GROUP( sse )
 #endif
 
 
-extern void _ASMAPI
+extern void
 _mesa_v16_sse_general_xform( GLfloat *first_vert,
 			     const GLfloat *m,
 			     const GLfloat *src,
 			     GLuint src_stride,
 			     GLuint count );
 
-extern void _ASMAPI
+extern void
 _mesa_sse_project_vertices( GLfloat *first,
 			    GLfloat *last,
 			    const GLfloat *m,
 			    GLuint stride );
 
-extern void _ASMAPI
+extern void
 _mesa_sse_project_clipped_vertices( GLfloat *first,
 				    GLfloat *last,
 				    const GLfloat *m,
diff --git a/src/mesa/x86/x86_xform.c b/src/mesa/x86/x86_xform.c
index 007cd70..8b5cf91 100644
--- a/src/mesa/x86/x86_xform.c
+++ b/src/mesa/x86/x86_xform.c
@@ -54,7 +54,7 @@ DECLARE_XFORM_GROUP( x86, 3 )
 DECLARE_XFORM_GROUP( x86, 4 )
 
 
-extern GLvector4f * _ASMAPI
+extern GLvector4f *
 _mesa_x86_cliptest_points4( GLvector4f *clip_vec,
 			    GLvector4f *proj_vec,
 			    GLubyte clipMask[],
@@ -62,7 +62,7 @@ _mesa_x86_cliptest_points4( GLvector4f *clip_vec,
 			    GLubyte *andMask,
 			    GLboolean viewport_z_clip );
 
-extern GLvector4f * _ASMAPI
+extern GLvector4f *
 _mesa_x86_cliptest_points4_np( GLvector4f *clip_vec,
 			       GLvector4f *proj_vec,
 			       GLubyte clipMask[],
@@ -70,7 +70,7 @@ _mesa_x86_cliptest_points4_np( GLvector4f *clip_vec,
 			       GLubyte *andMask,
 			       GLboolean viewport_z_clip );
 
-extern void _ASMAPI
+extern void
 _mesa_v16_x86_cliptest_points4( GLfloat *first_vert,
 				GLfloat *last_vert,
 				GLubyte *or_mask,
@@ -78,7 +78,7 @@ _mesa_v16_x86_cliptest_points4( GLfloat *first_vert,
 				GLubyte *clip_mask,
 				GLboolean viewport_z_clip );
 
-extern void _ASMAPI
+extern void
 _mesa_v16_x86_general_xform( GLfloat *dest,
 			     const GLfloat *m,
 			     const GLfloat *src,
diff --git a/src/mesa/x86/x86_xform.h b/src/mesa/x86/x86_xform.h
index 12b9fb8..e398f64 100644
--- a/src/mesa/x86/x86_xform.h
+++ b/src/mesa/x86/x86_xform.h
@@ -39,13 +39,13 @@
 			const GLvector4f *from_vec
 
 #define DECLARE_XFORM_GROUP( pfx, sz ) \
-extern void _ASMAPI _mesa_##pfx##_transform_points##sz##_general( XFORM_ARGS );		\
-extern void _ASMAPI _mesa_##pfx##_transform_points##sz##_identity( XFORM_ARGS );	\
-extern void _ASMAPI _mesa_##pfx##_transform_points##sz##_3d_no_rot( XFORM_ARGS );	\
-extern void _ASMAPI _mesa_##pfx##_transform_points##sz##_perspective( XFORM_ARGS );	\
-extern void _ASMAPI _mesa_##pfx##_transform_points##sz##_2d( XFORM_ARGS );		\
-extern void _ASMAPI _mesa_##pfx##_transform_points##sz##_2d_no_rot( XFORM_ARGS );	\
-extern void _ASMAPI _mesa_##pfx##_transform_points##sz##_3d( XFORM_ARGS );
+extern void _mesa_##pfx##_transform_points##sz##_general( XFORM_ARGS );		\
+extern void _mesa_##pfx##_transform_points##sz##_identity( XFORM_ARGS );	\
+extern void _mesa_##pfx##_transform_points##sz##_3d_no_rot( XFORM_ARGS );	\
+extern void _mesa_##pfx##_transform_points##sz##_perspective( XFORM_ARGS );	\
+extern void _mesa_##pfx##_transform_points##sz##_2d( XFORM_ARGS );		\
+extern void _mesa_##pfx##_transform_points##sz##_2d_no_rot( XFORM_ARGS );	\
+extern void _mesa_##pfx##_transform_points##sz##_3d( XFORM_ARGS );
 
 #define ASSIGN_XFORM_GROUP( pfx, sz )					\
    _mesa_transform_tab[sz][MATRIX_GENERAL] =				\
@@ -75,14 +75,14 @@ extern void _ASMAPI _mesa_##pfx##_transform_points##sz##_3d( XFORM_ARGS );
 			GLvector4f *dest
 
 #define DECLARE_NORM_GROUP( pfx ) \
-extern void _ASMAPI _mesa_##pfx##_rescale_normals( NORM_ARGS );				\
-extern void _ASMAPI _mesa_##pfx##_normalize_normals( NORM_ARGS );			\
-extern void _ASMAPI _mesa_##pfx##_transform_normals( NORM_ARGS );			\
-extern void _ASMAPI _mesa_##pfx##_transform_normals_no_rot( NORM_ARGS );		\
-extern void _ASMAPI _mesa_##pfx##_transform_rescale_normals( NORM_ARGS );		\
-extern void _ASMAPI _mesa_##pfx##_transform_rescale_normals_no_rot( NORM_ARGS );	\
-extern void _ASMAPI _mesa_##pfx##_transform_normalize_normals( NORM_ARGS );		\
-extern void _ASMAPI _mesa_##pfx##_transform_normalize_normals_no_rot( NORM_ARGS );
+extern void _mesa_##pfx##_rescale_normals( NORM_ARGS );				\
+extern void _mesa_##pfx##_normalize_normals( NORM_ARGS );			\
+extern void _mesa_##pfx##_transform_normals( NORM_ARGS );			\
+extern void _mesa_##pfx##_transform_normals_no_rot( NORM_ARGS );		\
+extern void _mesa_##pfx##_transform_rescale_normals( NORM_ARGS );		\
+extern void _mesa_##pfx##_transform_rescale_normals_no_rot( NORM_ARGS );	\
+extern void _mesa_##pfx##_transform_normalize_normals( NORM_ARGS );		\
+extern void _mesa_##pfx##_transform_normalize_normals_no_rot( NORM_ARGS );
 
 #define ASSIGN_NORM_GROUP( pfx )					\
    _mesa_normal_tab[NORM_RESCALE] =					\
-- 
1.9.1



More information about the mesa-dev mailing list