Fix problems compiling xmmintrin.h with only -msse.
authorBernd Schmidt <bernds@redhat.com>
Mon, 6 May 2002 18:17:08 +0000 (18:17 +0000)
committerBernd Schmidt <bernds@gcc.gnu.org>
Mon, 6 May 2002 18:17:08 +0000 (18:17 +0000)
From-SVN: r53230

gcc/ChangeLog
gcc/config/i386/i386.h
gcc/config/i386/xmmintrin.h

index 89afcc7b3cde24aee9131ff085c06985b0ac7ff8..3dd3a44c3e356b09707f24f6caa9d8f963cbe3be 100644 (file)
@@ -1,3 +1,9 @@
+2002-05-06  Bernd Schmidt  <bernds@redhat.com>
+
+       * config/i386/i386.h (CPP_CPUCOMMON_SPEC): Define __SSE2_BUILTINS__ if  
+       -msse2.
+       * config/i386/xmmintrin.h: Use it to conditionalize SSE2 support.
+       
 2002-05-06  Roger Sayle  <roger@eyesopen.com>
 
        * fold-const.c (lshift-double): Cast the high word to an unsigned
index 0454cad6084573927eed639b4260b5e5bcbb1878..727537125951c06fe5c46547c53c6f716e8809dc 100644 (file)
@@ -619,6 +619,7 @@ extern int ix86_arch;
 |march=athlon-mp: -D__3dNOW__ }\
 %{march=athlon|march=athlon-tbird|march=athlon-4|march=athlon-xp\
 |march=athlon-mp: -D__3dNOW_A__ }\
+%{msse2: -D__SSE2_BUILTINS__ }\
 %{march=pentium4: -D__SSE2__ }\
 %{!march*:%{!mcpu*:%{!m386:%{!m486:%{!mpentium*:%(cpp_cpu_default)}}}}}"
 
index 294df600cb9692a1d77dd0b285b616f8ae149179..bf7a7ad5716000d54a1e728054b6582f018a90b7 100644 (file)
@@ -1058,6 +1058,7 @@ do {                                                                      \
   (row3) = __builtin_ia32_shufps (__t2, __t3, 0xDD);                   \
 } while (0)
 
+#ifdef __SSE2_BUILTINS__
 /* SSE2 */
 typedef int __v2df __attribute__ ((mode (V2DF)));
 typedef int __v2di __attribute__ ((mode (V2DI)));
@@ -1978,7 +1979,6 @@ _mm_mfence (void)
   __builtin_ia32_mfence ();
 }
 
-/* End of SSE2.  */
-
+#endif /* __SSE2_BUILTINS__  */
 
 #endif /* _XMMINTRIN_H_INCLUDED */