PATCH: Handle v4sf_ftype_v4sf SSE3 binutils automatically

H. J. Lu hjl@lucon.org
Sun Oct 22 19:17:00 GMT 2006


With SSSE3 patch, now we can handle SSE  builtins with more or less
simple operations on 1 operand automatically. This patch converts
2 SSE3 binutils to this new scheme. It has been tested on Linux/x86
and Linux/x86-64.

Is this OK for mainline?

H.J.
----
2006-02-24  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386.c (bdesc_1arg): Initialize
	IX86_BUILTIN_MOVSHDUP and IX86_BUILTIN_MOVSLDUP with
	"__builtin_ia32_movshdup" and "__builtin_ia32_movsldup".
	(ix86_init_mmx_sse_builtins): Remove IX86_BUILTIN_MOVSHDUP
	and IX86_BUILTIN_MOVSLDUP.

--- gcc/config/i386/i386.c.clean	2006-10-21 14:06:31.000000000 -0700
+++ gcc/config/i386/i386.c	2006-10-21 14:07:51.000000000 -0700
@@ -14965,8 +14965,8 @@ static const struct builtin_description 
   { MASK_SSE2, CODE_FOR_sse2_cvttps2dq, 0, IX86_BUILTIN_CVTTPS2DQ, 0, 0 },
 
   /* SSE3 */
-  { MASK_SSE3, CODE_FOR_sse3_movshdup, 0, IX86_BUILTIN_MOVSHDUP, 0, 0 },
-  { MASK_SSE3, CODE_FOR_sse3_movsldup, 0, IX86_BUILTIN_MOVSLDUP, 0, 0 },
+  { MASK_SSE3, CODE_FOR_sse3_movshdup, "__builtin_ia32_movshdup", IX86_BUILTIN_MOVSHDUP, 0, 0 },
+  { MASK_SSE3, CODE_FOR_sse3_movsldup, "__builtin_ia32_movsldup", IX86_BUILTIN_MOVSLDUP, 0, 0 },
 
   /* SSSE3 */
   { MASK_SSSE3, CODE_FOR_absv16qi2, "__builtin_ia32_pabsb128", IX86_BUILTIN_PABSB128, 0, 0 },
@@ -15604,12 +15604,6 @@ ix86_init_mmx_sse_builtins (void)
   def_builtin (MASK_SSE3, "__builtin_ia32_mwait",
 	       void_ftype_unsigned_unsigned,
 	       IX86_BUILTIN_MWAIT);
-  def_builtin (MASK_SSE3, "__builtin_ia32_movshdup",
-	       v4sf_ftype_v4sf,
-	       IX86_BUILTIN_MOVSHDUP);
-  def_builtin (MASK_SSE3, "__builtin_ia32_movsldup",
-	       v4sf_ftype_v4sf,
-	       IX86_BUILTIN_MOVSLDUP);
   def_builtin (MASK_SSE3, "__builtin_ia32_lddqu",
 	       v16qi_ftype_pcchar, IX86_BUILTIN_LDDQU);
 



More information about the Gcc-patches mailing list