I don't know the story about this _ASMAPI macro, but __cdecl is also the default calling convention for WIN32:

  https://msdn.microsoft.com/en-us/library/zkwh89ks.aspx

so it's redundant to add it. (The other common calling convention -- __stdcall/APIENTRY/etc -- is the one that must always be explcitely added when needed).

So we should just drop _ASMAPI/__cdecl completely.

Jose


On 11/03/15 01:44, Brian Paul wrote:
__cdecl is the MSVC directive use to indicate caller stack cleanup.
We typically annotate code-generated functions with __cdecl so we can
use the same code on all platforms.

A new #define like CDECL would be nicer, but CDECL is already defined
in minwindef.h on Windows.
---
  src/mesa/main/compiler.h    | 13 ++++------
  src/mesa/math/m_clip_tmp.h  |  8 +++----
  src/mesa/math/m_norm_tmp.h  | 18 +++++++-------
  src/mesa/math/m_xform.h     |  6 ++---
  src/mesa/math/m_xform_tmp.h | 58 ++++++++++++++++++++++-----------------------
  src/mesa/swrast/s_blend.c   | 18 +++++++-------
  src/mesa/swrast/s_context.c |  2 +-
  src/mesa/swrast/s_context.h |  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 +++++++++++------------
  14 files changed, 104 insertions(+), 107 deletions(-)

diff --git a/src/mesa/main/compiler.h b/src/mesa/main/compiler.h
index 1e97b4c..f56dc3e 100644
--- a/src/mesa/main/compiler.h
+++ b/src/mesa/main/compiler.h
@@ -115,18 +115,15 @@ extern "C" {


  /**
- * Create a macro so that asm functions can be linked into compilers other
- * than GNU C
+ * Use __cdecl to match gcc calling convention for caller stack cleanup
+ * so we can use the same assembly / codegen code on all platforms.
   */
-#ifndef _ASMAPI
-#if defined(_WIN32)
-#define _ASMAPI __cdecl
-#else
-#define _ASMAPI
-#endif
+#if !defined(_MSC_VER)
+#define __cdecl
  #endif


+
  /**
   * LONGSTRING macro
   * gcc -pedantic warns about long string literals, LONGSTRING silences that.
diff --git a/src/mesa/math/m_clip_tmp.h b/src/mesa/math/m_clip_tmp.h
index 9a07c84..ee82be3 100644
--- a/src/mesa/math/m_clip_tmp.h
+++ b/src/mesa/math/m_clip_tmp.h
@@ -40,7 +40,7 @@
   * \param andMask bitwise-AND of clipMask values
   * \return proj_vec pointer
   */
-static GLvector4f * _ASMAPI TAG(cliptest_points4)( GLvector4f *clip_vec,
+static GLvector4f * __cdecl TAG(cliptest_points4)( GLvector4f *clip_vec,
                                                       GLvector4f *proj_vec,
                                                       GLubyte clipMask[],
                                                       GLubyte *orMask,
@@ -120,7 +120,7 @@ static GLvector4f * _ASMAPI TAG(cliptest_points4)( 
GLvector4f *clip_vec,
   * \param andMask bitwise-AND of clipMask values
   * \return clip_vec pointer
   */
-static GLvector4f * _ASMAPI TAG(cliptest_np_points4)( GLvector4f *clip_vec,
+static GLvector4f * __cdecl TAG(cliptest_np_points4)( GLvector4f *clip_vec,
                                                        GLvector4f *proj_vec,
                                                        GLubyte clipMask[],
                                                        GLubyte *orMask,
@@ -177,7 +177,7 @@ static GLvector4f * _ASMAPI TAG(cliptest_np_points4)( 
GLvector4f *clip_vec,
  }


-static GLvector4f * _ASMAPI TAG(cliptest_points3)( GLvector4f *clip_vec,
+static GLvector4f * __cdecl TAG(cliptest_points3)( GLvector4f *clip_vec,
                                                       GLvector4f *proj_vec,
                                                       GLubyte clipMask[],
                                                       GLubyte *orMask,
@@ -213,7 +213,7 @@ static GLvector4f * _ASMAPI TAG(cliptest_points3)( 
GLvector4f *clip_vec,
  }


-static GLvector4f * _ASMAPI TAG(cliptest_points2)( GLvector4f *clip_vec,
+static GLvector4f * __cdecl TAG(cliptest_points2)( GLvector4f *clip_vec,
                                                       GLvector4f *proj_vec,
                                                       GLubyte clipMask[],
                                                       GLubyte *orMask,
diff --git a/src/mesa/math/m_norm_tmp.h b/src/mesa/math/m_norm_tmp.h
index 163679b..129f78d 100644
--- a/src/mesa/math/m_norm_tmp.h
+++ b/src/mesa/math/m_norm_tmp.h
@@ -39,7 +39,7 @@
   *           optimization)
   * dest - the destination vector of normals
   */
-static void _ASMAPI
+static void __cdecl
  TAG(transform_normalize_normals)( const GLmatrix *mat,
                                    GLfloat scale,
                                    const GLvector4f *in,
@@ -106,7 +106,7 @@ TAG(transform_normalize_normals)( const GLmatrix *mat,
  }


-static void _ASMAPI
+static void __cdecl
  TAG(transform_normalize_normals_no_rot)( const GLmatrix *mat,
                                           GLfloat scale,
                                           const GLvector4f *in,
@@ -171,7 +171,7 @@ TAG(transform_normalize_normals_no_rot)( const GLmatrix 
*mat,
  }


-static void _ASMAPI
+static void __cdecl
  TAG(transform_rescale_normals_no_rot)( const GLmatrix *mat,
                                         GLfloat scale,
                                         const GLvector4f *in,
@@ -200,7 +200,7 @@ TAG(transform_rescale_normals_no_rot)( const GLmatrix *mat,
  }


-static void _ASMAPI
+static void __cdecl
  TAG(transform_rescale_normals)( const GLmatrix *mat,
                                  GLfloat scale,
                                  const GLvector4f *in,
@@ -232,7 +232,7 @@ TAG(transform_rescale_normals)( const GLmatrix *mat,
  }


-static void _ASMAPI
+static void __cdecl
  TAG(transform_normals_no_rot)( const GLmatrix *mat,
                               GLfloat scale,
                               const GLvector4f *in,
@@ -262,7 +262,7 @@ TAG(transform_normals_no_rot)( const GLmatrix *mat,
  }


-static void _ASMAPI
+static void __cdecl
  TAG(transform_normals)( const GLmatrix *mat,
                          GLfloat scale,
                          const GLvector4f *in,
@@ -292,7 +292,7 @@ TAG(transform_normals)( const GLmatrix *mat,
  }


-static void _ASMAPI
+static void __cdecl
  TAG(normalize_normals)( const GLmatrix *mat,
                          GLfloat scale,
                          const GLvector4f *in,
@@ -338,7 +338,7 @@ TAG(normalize_normals)( const GLmatrix *mat,
  }


-static void _ASMAPI
+static void __cdecl
  TAG(rescale_normals)( const GLmatrix *mat,
                        GLfloat scale,
                        const GLvector4f *in,
@@ -361,7 +361,7 @@ TAG(rescale_normals)( const GLmatrix *mat,
  }


-static void _ASMAPI
+static void __cdecl
  TAG(init_c_norm_transform)( void )
  {
     _mesa_normal_tab[NORM_TRANSFORM_NO_ROT] =
diff --git a/src/mesa/math/m_xform.h b/src/mesa/math/m_xform.h
index 3ebe742..efc88cb 100644
--- a/src/mesa/math/m_xform.h
+++ b/src/mesa/math/m_xform.h
@@ -91,7 +91,7 @@ init_c_cliptest(void);
  #define CLIP_FRUSTUM_BITS    0x3f


-typedef GLvector4f * (_ASMAPI *clip_func)( GLvector4f *vClip,
+typedef GLvector4f * (__cdecl *clip_func)( GLvector4f *vClip,
                                             GLvector4f *vProj,
                                             GLubyte clipMask[],
                                             GLubyte *orMask,
@@ -111,7 +111,7 @@ typedef void (*vec_copy_func)( GLvector4f *to,
  /*
   * Functions for transformation of normals in the VB.
   */
-typedef void (_ASMAPI *normal_func)( const GLmatrix *mat,
+typedef void (__cdecl *normal_func)( const GLmatrix *mat,
                                      GLfloat scale,
                                      const GLvector4f *in,
                                      const GLfloat lengths[],
@@ -133,7 +133,7 @@ typedef void (_ASMAPI *normal_func)( const GLmatrix *mat,
   *     when the mask byte is zero.  This is always present as a
   *     parameter, to allow a unified interface.
   */
-typedef void (_ASMAPI *transform_func)( GLvector4f *to_vec,
+typedef void (__cdecl *transform_func)( GLvector4f *to_vec,
                                          const GLfloat m[16],
                                          const GLvector4f *from_vec );

diff --git a/src/mesa/math/m_xform_tmp.h b/src/mesa/math/m_xform_tmp.h
index 089dc78..5f14d25 100644
--- a/src/mesa/math/m_xform_tmp.h
+++ b/src/mesa/math/m_xform_tmp.h
@@ -70,7 +70,7 @@
   *     driver-specific vertex format.
   */

-static void _ASMAPI
+static void __cdecl
  TAG(transform_points1_general)( GLvector4f *to_vec,
                                const GLfloat m[16],
                                const GLvector4f *from_vec )
@@ -96,7 +96,7 @@ TAG(transform_points1_general)( GLvector4f *to_vec,
     to_vec->count = from_vec->count;
  }

-static void _ASMAPI
+static void __cdecl
  TAG(transform_points1_identity)( GLvector4f *to_vec,
                                 const GLfloat m[16],
                                 const GLvector4f *from_vec )
@@ -116,7 +116,7 @@ TAG(transform_points1_identity)( GLvector4f *to_vec,
     to_vec->count = from_vec->count;
  }

-static void _ASMAPI
+static void __cdecl
  TAG(transform_points1_2d)( GLvector4f *to_vec,
                           const GLfloat m[16],
                           const GLvector4f *from_vec )
@@ -138,7 +138,7 @@ TAG(transform_points1_2d)( GLvector4f *to_vec,
     to_vec->count = from_vec->count;
  }

-static void _ASMAPI
+static void __cdecl
  TAG(transform_points1_2d_no_rot)( GLvector4f *to_vec,
                                  const GLfloat m[16],
                                  const GLvector4f *from_vec )
@@ -159,7 +159,7 @@ TAG(transform_points1_2d_no_rot)( GLvector4f *to_vec,
     to_vec->count = from_vec->count;
  }

-static void _ASMAPI
+static void __cdecl
  TAG(transform_points1_3d)( GLvector4f *to_vec,
                           const GLfloat m[16],
                           const GLvector4f *from_vec )
@@ -183,7 +183,7 @@ TAG(transform_points1_3d)( GLvector4f *to_vec,
  }


-static void _ASMAPI
+static void __cdecl
  TAG(transform_points1_3d_no_rot)( GLvector4f *to_vec,
                                  const GLfloat m[16],
                                  const GLvector4f *from_vec )
@@ -206,7 +206,7 @@ TAG(transform_points1_3d_no_rot)( GLvector4f *to_vec,
     to_vec->count = from_vec->count;
  }

-static void _ASMAPI
+static void __cdecl
  TAG(transform_points1_perspective)( GLvector4f *to_vec,
                                    const GLfloat m[16],
                                    const GLvector4f *from_vec )
@@ -236,7 +236,7 @@ TAG(transform_points1_perspective)( GLvector4f *to_vec,
   * present early in the geometry pipeline and throughout the
   * texture pipeline.
   */
-static void _ASMAPI
+static void __cdecl
  TAG(transform_points2_general)( GLvector4f *to_vec,
                                const GLfloat m[16],
                                const GLvector4f *from_vec )
@@ -262,7 +262,7 @@ TAG(transform_points2_general)( GLvector4f *to_vec,
     to_vec->count = from_vec->count;
  }

-static void _ASMAPI
+static void __cdecl
  TAG(transform_points2_identity)( GLvector4f *to_vec,
                                 const GLfloat m[16],
                                 const GLvector4f *from_vec )
@@ -283,7 +283,7 @@ TAG(transform_points2_identity)( GLvector4f *to_vec,
     to_vec->count = from_vec->count;
  }

-static void _ASMAPI
+static void __cdecl
  TAG(transform_points2_2d)( GLvector4f *to_vec,
                           const GLfloat m[16],
                           const GLvector4f *from_vec )
@@ -305,7 +305,7 @@ TAG(transform_points2_2d)( GLvector4f *to_vec,
     to_vec->count = from_vec->count;
  }

-static void _ASMAPI
+static void __cdecl
  TAG(transform_points2_2d_no_rot)( GLvector4f *to_vec,
                                  const GLfloat m[16],
                                  const GLvector4f *from_vec )
@@ -326,7 +326,7 @@ TAG(transform_points2_2d_no_rot)( GLvector4f *to_vec,
     to_vec->count = from_vec->count;
  }

-static void _ASMAPI
+static void __cdecl
  TAG(transform_points2_3d)( GLvector4f *to_vec,
                           const GLfloat m[16],
                           const GLvector4f *from_vec )
@@ -353,7 +353,7 @@ TAG(transform_points2_3d)( GLvector4f *to_vec,
  /* I would actually say this was a fairly important function, from
   * a texture transformation point of view.
   */
-static void _ASMAPI
+static void __cdecl
  TAG(transform_points2_3d_no_rot)( GLvector4f *to_vec,
                                  const GLfloat m[16],
                                  const GLvector4f *from_vec )
@@ -382,7 +382,7 @@ TAG(transform_points2_3d_no_rot)( GLvector4f *to_vec,
  }


-static void _ASMAPI
+static void __cdecl
  TAG(transform_points2_perspective)( GLvector4f *to_vec,
                                    const GLfloat m[16],
                                    const GLvector4f *from_vec )
@@ -407,7 +407,7 @@ TAG(transform_points2_perspective)( GLvector4f *to_vec,



-static void _ASMAPI
+static void __cdecl
  TAG(transform_points3_general)( GLvector4f *to_vec,
                                const GLfloat m[16],
                                const GLvector4f *from_vec )
@@ -433,7 +433,7 @@ TAG(transform_points3_general)( GLvector4f *to_vec,
     to_vec->count = from_vec->count;
  }

-static void _ASMAPI
+static void __cdecl
  TAG(transform_points3_identity)( GLvector4f *to_vec,
                                 const GLfloat m[16],
                                 const GLvector4f *from_vec )
@@ -455,7 +455,7 @@ TAG(transform_points3_identity)( GLvector4f *to_vec,
     to_vec->count = from_vec->count;
  }

-static void _ASMAPI
+static void __cdecl
  TAG(transform_points3_2d)( GLvector4f *to_vec,
                           const GLfloat m[16],
                           const GLvector4f *from_vec )
@@ -478,7 +478,7 @@ TAG(transform_points3_2d)( GLvector4f *to_vec,
     to_vec->count = from_vec->count;
  }

-static void _ASMAPI
+static void __cdecl
  TAG(transform_points3_2d_no_rot)( GLvector4f *to_vec,
                                  const GLfloat m[16],
                                  const GLvector4f *from_vec )
@@ -500,7 +500,7 @@ TAG(transform_points3_2d_no_rot)( GLvector4f *to_vec,
     to_vec->count = from_vec->count;
  }

-static void _ASMAPI
+static void __cdecl
  TAG(transform_points3_3d)( GLvector4f *to_vec,
                           const GLfloat m[16],
                           const GLvector4f *from_vec )
@@ -526,7 +526,7 @@ TAG(transform_points3_3d)( GLvector4f *to_vec,

  /* previously known as ortho...
   */
-static void _ASMAPI
+static void __cdecl
  TAG(transform_points3_3d_no_rot)( GLvector4f *to_vec,
                                  const GLfloat m[16],
                                  const GLvector4f *from_vec )
@@ -549,7 +549,7 @@ TAG(transform_points3_3d_no_rot)( GLvector4f *to_vec,
     to_vec->count = from_vec->count;
  }

-static void _ASMAPI
+static void __cdecl
  TAG(transform_points3_perspective)( GLvector4f *to_vec,
                                    const GLfloat m[16],
                                    const GLvector4f *from_vec )
@@ -575,7 +575,7 @@ TAG(transform_points3_perspective)( GLvector4f *to_vec,



-static void _ASMAPI
+static void __cdecl
  TAG(transform_points4_general)( GLvector4f *to_vec,
                                const GLfloat m[16],
                                const GLvector4f *from_vec )
@@ -601,7 +601,7 @@ TAG(transform_points4_general)( GLvector4f *to_vec,
     to_vec->count = from_vec->count;
  }

-static void _ASMAPI
+static void __cdecl
  TAG(transform_points4_identity)( GLvector4f *to_vec,
                                 const GLfloat m[16],
                                 const GLvector4f *from_vec )
@@ -624,7 +624,7 @@ TAG(transform_points4_identity)( GLvector4f *to_vec,
     to_vec->count = from_vec->count;
  }

-static void _ASMAPI
+static void __cdecl
  TAG(transform_points4_2d)( GLvector4f *to_vec,
                           const GLfloat m[16],
                           const GLvector4f *from_vec )
@@ -648,7 +648,7 @@ TAG(transform_points4_2d)( GLvector4f *to_vec,
     to_vec->count = from_vec->count;
  }

-static void _ASMAPI
+static void __cdecl
  TAG(transform_points4_2d_no_rot)( GLvector4f *to_vec,
                                  const GLfloat m[16],
                                  const GLvector4f *from_vec )
@@ -671,7 +671,7 @@ TAG(transform_points4_2d_no_rot)( GLvector4f *to_vec,
     to_vec->count = from_vec->count;
  }

-static void _ASMAPI
+static void __cdecl
  TAG(transform_points4_3d)( GLvector4f *to_vec,
                           const GLfloat m[16],
                           const GLvector4f *from_vec )
@@ -696,7 +696,7 @@ TAG(transform_points4_3d)( GLvector4f *to_vec,
     to_vec->count = from_vec->count;
  }

-static void _ASMAPI
+static void __cdecl
  TAG(transform_points4_3d_no_rot)( GLvector4f *to_vec,
                                  const GLfloat m[16],
                                  const GLvector4f *from_vec )
@@ -720,7 +720,7 @@ TAG(transform_points4_3d_no_rot)( GLvector4f *to_vec,
     to_vec->count = from_vec->count;
  }

-static void _ASMAPI
+static void __cdecl
  TAG(transform_points4_perspective)( GLvector4f *to_vec,
                                    const GLfloat m[16],
                                    const GLvector4f *from_vec )
@@ -753,7 +753,7 @@ static transform_func TAG(transform_tab_4)[7];
   * optimized routines overwriting the arrays.  This only occurs during
   * startup.
   */
-static void _ASMAPI TAG(init_c_transformations)( void )
+static void __cdecl TAG(init_c_transformations)( void )
  {
  #define TAG_TAB   _mesa_transform_tab
  #define TAG_TAB_1 TAG(transform_tab_1)
diff --git a/src/mesa/swrast/s_blend.c b/src/mesa/swrast/s_blend.c
index a9945f6..f5564b3 100644
--- a/src/mesa/swrast/s_blend.c
+++ b/src/mesa/swrast/s_blend.c
@@ -66,7 +66,7 @@
   * No-op means the framebuffer values remain unchanged.
   * Any chanType ok.
   */
-static void _ASMAPI
+static void __cdecl
  blend_noop(struct gl_context *ctx, GLuint n, const GLubyte mask[],
             GLvoid *src, const GLvoid *dst, GLenum chanType)
  {
@@ -94,7 +94,7 @@ blend_noop(struct gl_context *ctx, GLuint n, const GLubyte 
mask[],
   * Special case for glBlendFunc(GL_ONE, GL_ZERO)
   * Any chanType ok.
   */
-static void _ASMAPI
+static void __cdecl
  blend_replace(struct gl_context *ctx, GLuint n, const GLubyte mask[],
                GLvoid *src, const GLvoid *dst, GLenum chanType)
  {
@@ -114,7 +114,7 @@ blend_replace(struct gl_context *ctx, GLuint n, const 
GLubyte mask[],
   * Common transparency blending mode:
   * glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA).
   */
-static void _ASMAPI
+static void __cdecl
  blend_transparency_ubyte(struct gl_context *ctx, GLuint n, const GLubyte 
mask[],
                           GLvoid *src, const GLvoid *dst, GLenum chanType)
  {
@@ -159,7 +159,7 @@ blend_transparency_ubyte(struct gl_context *ctx, GLuint n, 
const GLubyte mask[],
  }


-static void _ASMAPI
+static void __cdecl
  blend_transparency_ushort(struct gl_context *ctx, GLuint n, const GLubyte 
mask[],
                            GLvoid *src, const GLvoid *dst, GLenum chanType)
  {
@@ -197,7 +197,7 @@ blend_transparency_ushort(struct gl_context *ctx, GLuint n, 
const GLubyte mask[]
  }


-static void _ASMAPI
+static void __cdecl
  blend_transparency_float(struct gl_context *ctx, GLuint n, const GLubyte 
mask[],
                           GLvoid *src, const GLvoid *dst, GLenum chanType)
  {
@@ -239,7 +239,7 @@ blend_transparency_float(struct gl_context *ctx, GLuint n, 
const GLubyte mask[],
   * Add src and dest: glBlendFunc(GL_ONE, GL_ONE).
   * Any chanType ok.
   */
-static void _ASMAPI
+static void __cdecl
  blend_add(struct gl_context *ctx, GLuint n, const GLubyte mask[],
            GLvoid *src, const GLvoid *dst, GLenum chanType)
  {
@@ -305,7 +305,7 @@ blend_add(struct gl_context *ctx, GLuint n, const GLubyte 
mask[],
   * Blend min function.
   * Any chanType ok.
   */
-static void _ASMAPI
+static void __cdecl
  blend_min(struct gl_context *ctx, GLuint n, const GLubyte mask[],
            GLvoid *src, const GLvoid *dst, GLenum chanType)
  {
@@ -358,7 +358,7 @@ blend_min(struct gl_context *ctx, GLuint n, const GLubyte 
mask[],
   * Blend max function.
   * Any chanType ok.
   */
-static void _ASMAPI
+static void __cdecl
  blend_max(struct gl_context *ctx, GLuint n, const GLubyte mask[],
            GLvoid *src, const GLvoid *dst, GLenum chanType)
  {
@@ -412,7 +412,7 @@ blend_max(struct gl_context *ctx, GLuint n, const GLubyte 
mask[],
   * Modulate:  result = src * dest
   * Any chanType ok.
   */
-static void _ASMAPI
+static void __cdecl
  blend_modulate(struct gl_context *ctx, GLuint n, const GLubyte mask[],
                 GLvoid *src, const GLvoid *dst, GLenum chanType)
  {
diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c
index 51cc227..d7bebfa 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 __cdecl
  _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/swrast/s_context.h b/src/mesa/swrast/s_context.h
index 6c46b27..9fee9bd 100644
--- a/src/mesa/swrast/s_context.h
+++ b/src/mesa/swrast/s_context.h
@@ -58,7 +58,7 @@ typedef void (*texture_sample_func)(struct gl_context *ctx,
                                      GLuint n, const GLfloat texcoords[][4],
                                      const GLfloat lambda[], GLfloat 
rgba[][4]);

-typedef void (_ASMAPI *blend_func)( struct gl_context *ctx, GLuint n,
+typedef void (__cdecl *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..d506117 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 __cdecl
  _mesa_v16_3dnow_general_xform( GLfloat *first_vert,
                               const GLfloat *m,
                               const GLfloat *src,
                               GLuint src_stride,
                               GLuint count );

-extern void _ASMAPI
+extern void __cdecl
  _mesa_3dnow_project_vertices( GLfloat *first,
                              GLfloat *last,
                              const GLfloat *m,
                              GLuint stride );

-extern void _ASMAPI
+extern void __cdecl
  _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..636ee9d 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 __cdecl _mesa_x86_has_cpuid(void);
+extern void __cdecl _mesa_x86_cpuid(GLuint op, GLuint *reg_eax, GLuint 
*reg_ebx, GLuint *reg_ecx, GLuint *reg_edx);
+extern GLuint __cdecl _mesa_x86_cpuid_eax(GLuint op);
+extern GLuint __cdecl _mesa_x86_cpuid_ebx(GLuint op);
+extern GLuint __cdecl _mesa_x86_cpuid_ecx(GLuint op);
+extern GLuint __cdecl _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..122fa58 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 __cdecl
  _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 __cdecl
  _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 __cdecl
  _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 __cdecl
  _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 __cdecl
  _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..602d166 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 __cdecl _mesa_sse_transform_normals_no_rot( NORM_ARGS );
+extern void __cdecl _mesa_sse_transform_rescale_normals( NORM_ARGS );
+extern void __cdecl _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 __cdecl _mesa_sse_transform_points4_general( XFORM_ARGS );
+extern void __cdecl _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 __cdecl _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 __cdecl _mesa_x86_transform_points4_identity( XFORM_ARGS );
  #else
  DECLARE_NORM_GROUP( sse )
  #endif


-extern void _ASMAPI
+extern void __cdecl
  _mesa_v16_sse_general_xform( GLfloat *first_vert,
                             const GLfloat *m,
                             const GLfloat *src,
                             GLuint src_stride,
                             GLuint count );

-extern void _ASMAPI
+extern void __cdecl
  _mesa_sse_project_vertices( GLfloat *first,
                            GLfloat *last,
                            const GLfloat *m,
                            GLuint stride );

-extern void _ASMAPI
+extern void __cdecl
  _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..59be5ba 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 * __cdecl
  _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 * __cdecl
  _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 __cdecl
  _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 __cdecl
  _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..406ed88 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 __cdecl _mesa_##pfx##_transform_points##sz##_general( XFORM_ARGS 
);                \
+extern void __cdecl _mesa_##pfx##_transform_points##sz##_identity( XFORM_ARGS 
);       \
+extern void __cdecl _mesa_##pfx##_transform_points##sz##_3d_no_rot( XFORM_ARGS 
);      \
+extern void __cdecl _mesa_##pfx##_transform_points##sz##_perspective( 
XFORM_ARGS );    \
+extern void __cdecl _mesa_##pfx##_transform_points##sz##_2d( XFORM_ARGS );     
        \
+extern void __cdecl _mesa_##pfx##_transform_points##sz##_2d_no_rot( XFORM_ARGS 
);      \
+extern void __cdecl _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 __cdecl _mesa_##pfx##_rescale_normals( NORM_ARGS );                
                \
+extern void __cdecl _mesa_##pfx##_normalize_normals( NORM_ARGS );              
        \
+extern void __cdecl _mesa_##pfx##_transform_normals( NORM_ARGS );              
        \
+extern void __cdecl _mesa_##pfx##_transform_normals_no_rot( NORM_ARGS );       
        \
+extern void __cdecl _mesa_##pfx##_transform_rescale_normals( NORM_ARGS );      
        \
+extern void __cdecl _mesa_##pfx##_transform_rescale_normals_no_rot( NORM_ARGS 
);       \
+extern void __cdecl _mesa_##pfx##_transform_normalize_normals( NORM_ARGS );    
        \
+extern void __cdecl _mesa_##pfx##_transform_normalize_normals_no_rot( 
NORM_ARGS );

  #define ASSIGN_NORM_GROUP( pfx )                                      \
     _mesa_normal_tab[NORM_RESCALE] =                                   \


_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to