+2009-11-05 Richard Henderson <rth@redhat.com>
+
+ * config/i386/ia32intrin.h: Protect CRC32 builtins with __SSE4_2__.
+
2009-11-05 Paul Brook <paul@codesourcery.com>
* config/arm/arm.c (arm_fp_model, arm_fpu_arch, arm_fpu_tune): Remove.
return __builtin_bswap32 (__X);
}
+#ifdef __SSE4_2__
/* 32bit accumulate CRC32 (polynomial 0x11EDC6F41) value. */
extern __inline unsigned int
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
{
return __builtin_ia32_crc32si (__C, __V);
}
+#endif /* SSE4.2 */
/* 32bit popcnt */
extern __inline int
--- /dev/null
+/* Test that x86intrin.h is usable with -O -pedantic-errors. */
+/* We were using SSE4.2 builtins without the extension available. */
+/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O -pedantic-errors" } */
+
+#include <x86intrin.h>
+
+int dummy;