PATCH: Don't enable SSE2 builtins with -msse

H. J. Lu hjl@lucon.org
Fri May 25 13:46:00 GMT 2007


SSE only supports V4SF. Other 128bit data types were introduced in
SSE2. This patch marks SSE2 builtins with MASK_SSE2.


H.J.
-----
2007-05-25  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386.c (__builtin_ia32_vec_ext_v2df): Mark it
	with MASK_SSE2.
	(__builtin_ia32_vec_ext_v2di): Likewise.
	(__builtin_ia32_vec_ext_v4si): Likewise.
	(__builtin_ia32_vec_ext_v8hi): Likewise.
	(__builtin_ia32_vec_ext_v4hi): Likewise.
	(__builtin_ia32_vec_ext_v16qi): Likewise.
	(__builtin_ia32_vec_set_v8hi): Likewise.
	(__builtin_ia32_vec_set_v4hi): Likewise.

--- gcc/config/i386/i386.c.sse2	2007-05-24 08:33:37.000000000 -0700
+++ gcc/config/i386/i386.c	2007-05-25 05:55:56.000000000 -0700
@@ -18053,13 +18053,13 @@ ix86_init_mmx_sse_builtins (void)
   /* Access to the vec_extract patterns.  */
   ftype = build_function_type_list (double_type_node, V2DF_type_node,
 				    integer_type_node, NULL_TREE);
-  def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v2df",
+  def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v2df",
 	       ftype, IX86_BUILTIN_VEC_EXT_V2DF);
 
   ftype = build_function_type_list (long_long_integer_type_node,
 				    V2DI_type_node, integer_type_node,
 				    NULL_TREE);
-  def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v2di",
+  def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v2di",
 	       ftype, IX86_BUILTIN_VEC_EXT_V2DI);
 
   ftype = build_function_type_list (float_type_node, V4SF_type_node,
@@ -18069,17 +18069,17 @@ ix86_init_mmx_sse_builtins (void)
 
   ftype = build_function_type_list (intSI_type_node, V4SI_type_node,
 				    integer_type_node, NULL_TREE);
-  def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v4si",
+  def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v4si",
 	       ftype, IX86_BUILTIN_VEC_EXT_V4SI);
 
   ftype = build_function_type_list (intHI_type_node, V8HI_type_node,
 				    integer_type_node, NULL_TREE);
-  def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v8hi",
+  def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v8hi",
 	       ftype, IX86_BUILTIN_VEC_EXT_V8HI);
 
   ftype = build_function_type_list (intHI_type_node, V4HI_type_node,
 				    integer_type_node, NULL_TREE);
-  def_builtin (MASK_SSE | MASK_3DNOW_A, "__builtin_ia32_vec_ext_v4hi",
+  def_builtin (MASK_SSE2 | MASK_3DNOW_A, "__builtin_ia32_vec_ext_v4hi",
 	       ftype, IX86_BUILTIN_VEC_EXT_V4HI);
 
   ftype = build_function_type_list (intSI_type_node, V2SI_type_node,
@@ -18089,7 +18089,7 @@ ix86_init_mmx_sse_builtins (void)
 
   ftype = build_function_type_list (intQI_type_node, V16QI_type_node,
 				    integer_type_node, NULL_TREE);
-  def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v16qi",
+  def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v16qi",
 	       ftype, IX86_BUILTIN_VEC_EXT_V16QI);
 
   /* Access to the vec_set patterns.  */
@@ -18114,13 +18114,13 @@ ix86_init_mmx_sse_builtins (void)
   ftype = build_function_type_list (V8HI_type_node, V8HI_type_node,
 				    intHI_type_node,
 				    integer_type_node, NULL_TREE);
-  def_builtin (MASK_SSE, "__builtin_ia32_vec_set_v8hi",
+  def_builtin (MASK_SSE2, "__builtin_ia32_vec_set_v8hi",
 	       ftype, IX86_BUILTIN_VEC_SET_V8HI);
 
   ftype = build_function_type_list (V4HI_type_node, V4HI_type_node,
 				    intHI_type_node,
 				    integer_type_node, NULL_TREE);
-  def_builtin (MASK_SSE | MASK_3DNOW_A, "__builtin_ia32_vec_set_v4hi",
+  def_builtin (MASK_SSE2 | MASK_3DNOW_A, "__builtin_ia32_vec_set_v4hi",
 	       ftype, IX86_BUILTIN_VEC_SET_V4HI);
 
   ftype = build_function_type_list (V16QI_type_node, V16QI_type_node,



More information about the Gcc-patches mailing list