+2019-08-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * config/arm/arm_acle.h: Use arch=armv8-a+crc+simd pragma for CRC32
+ intrinsics if __ARM_FP.
+ Use __ARM_FEATURE_CRC32 ifdef guard.
+
2019-08-22 Wilco Dijkstra <wdijkstr@arm.com>
* config/arm/arm.md (neon_for_64bits): Remove.
#endif /* (!__thumb__ || __thumb2__) && __ARM_ARCH >= 4. */
#pragma GCC push_options
-#if __ARM_ARCH >= 8
+#ifdef __ARM_FEATURE_CRC32
+#ifdef __ARM_FP
+#pragma GCC target ("arch=armv8-a+crc+simd")
+#else
#pragma GCC target ("arch=armv8-a+crc")
+#endif
__extension__ static __inline uint32_t __attribute__ ((__always_inline__))
__crc32b (uint32_t __a, uint8_t __b)
}
#endif
-#endif /* __ARM_ARCH >= 8. */
+#endif /* __ARM_FEATURE_CRC32 */
#pragma GCC pop_options
#ifdef __cplusplus
+2019-08-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/arm/acle/crc_hf_1.c: New test.
+
2019-08-22 Wilco Dijkstra <wdijkstr@arm.com>
* gcc.target/arm/neon-extend-1.c: Remove test.
--- /dev/null
+/* Test that using an Armv8-a hard-float target doesn't
+ break CRC intrinsics. */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_hard_vfp_ok } */
+/* { dg-options "-mfloat-abi=hard -march=armv8-a+simd+crc" } */
+
+#include <arm_acle.h>
+
+uint32_t
+foo (uint32_t a, uint32_t b)
+{
+ return __crc32cw (a, b);
+}