+2017-09-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ * gcc.target/arm/acle/cdp.c: Skip __ARM_FEATURE_COPROC check for
+ ARMv8-A and ARMv8-R.
+ * gcc.target/arm/acle/cdp2.c: Likewise.
+ * gcc.target/arm/acle/ldc.c: Likewise.
+ * gcc.target/arm/acle/ldc2.c: Likewise.
+ * gcc.target/arm/acle/ldc2l.c: Likewise.
+ * gcc.target/arm/acle/ldcl.c: Likewise.
+ * gcc.target/arm/acle/mcr.c: Likewise.
+ * gcc.target/arm/acle/mcr2.c: Likewise.
+ * gcc.target/arm/acle/mcrr.c: Likewise.
+ * gcc.target/arm/acle/mcrr2.c: Likewise.
+ * gcc.target/arm/acle/mrc.c: Likewise.
+ * gcc.target/arm/acle/mrc2.c: Likewise.
+ * gcc.target/arm/acle/mrrc.c: Likewise.
+ * gcc.target/arm/acle/mrrc2.c: Likewise.
+ * gcc.target/arm/acle/stc.c: Likewise.
+ * gcc.target/arm/acle/stc2.c: Likewise.
+ * gcc.target/arm/acle/stc2l.c: Likewise.
+ * gcc.target/arm/acle/stcl.c: Likewise.
+ * lib/target-supports.exp:
+ (check_effective_target_arm_coproc1_ok_nocache): Mention ldcl
+ and stcl in the comment.
+ (check_effective_target_arm_coproc2_ok_nocache): Allow Thumb-2 targets
+ and disable Thumb-1 targets.
+ (check_effective_target_arm_coproc3_ok_nocache): Likewise.
+ (check_effective_target_arm_coproc4_ok_nocache): Likewise.
+
2017-09-13 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/47226
/* { dg-require-effective-target arm_coproc1_ok } */
#include "arm_acle.h"
-#if (__ARM_FEATURE_COPROC & 0x1) == 0
+#if (__ARM_ARCH < 8 || !defined (__ARM_ARCH_ISA_ARM)) \
+ && (__ARM_FEATURE_COPROC & 0x1) == 0
#error "__ARM_FEATURE_COPROC does not have correct feature bits set"
#endif
/* { dg-require-effective-target arm_coproc2_ok } */
#include "arm_acle.h"
-#if (__ARM_FEATURE_COPROC & 0x2) == 0
+#if (__ARM_ARCH < 8 || !defined (__ARM_ARCH_ISA_ARM)) \
+ && (__ARM_FEATURE_COPROC & 0x2) == 0
#error "__ARM_FEATURE_COPROC does not have correct feature bits set"
#endif
/* { dg-require-effective-target arm_coproc1_ok } */
#include "arm_acle.h"
-#if (__ARM_FEATURE_COPROC & 0x1) == 0
+#if (__ARM_ARCH < 8 || !defined (__ARM_ARCH_ISA_ARM)) \
+ && (__ARM_FEATURE_COPROC & 0x1) == 0
#error "__ARM_FEATURE_COPROC does not have correct feature bits set"
#endif
/* { dg-require-effective-target arm_coproc2_ok } */
#include "arm_acle.h"
-#if (__ARM_FEATURE_COPROC & 0x2) == 0
+#if (__ARM_ARCH < 8 || !defined (__ARM_ARCH_ISA_ARM)) \
+ && (__ARM_FEATURE_COPROC & 0x2) == 0
#error "__ARM_FEATURE_COPROC does not have correct feature bits set"
#endif
/* { dg-require-effective-target arm_coproc2_ok } */
#include "arm_acle.h"
-#if (__ARM_FEATURE_COPROC & 0x2) == 0
+#if (__ARM_ARCH < 8 || !defined (__ARM_ARCH_ISA_ARM)) \
+ && (__ARM_FEATURE_COPROC & 0x2) == 0
#error "__ARM_FEATURE_COPROC does not have correct feature bits set"
#endif
/* { dg-require-effective-target arm_coproc1_ok } */
#include "arm_acle.h"
-#if (__ARM_FEATURE_COPROC & 0x1) == 0
+#if (__ARM_ARCH < 8 || !defined (__ARM_ARCH_ISA_ARM)) \
+ && (__ARM_FEATURE_COPROC & 0x1) == 0
#error "__ARM_FEATURE_COPROC does not have correct feature bits set"
#endif
/* { dg-require-effective-target arm_coproc1_ok } */
#include "arm_acle.h"
-#if (__ARM_FEATURE_COPROC & 0x1) == 0
+#if (__ARM_ARCH < 8 || !defined (__ARM_ARCH_ISA_ARM)) \
+ && (__ARM_FEATURE_COPROC & 0x1) == 0
#error "__ARM_FEATURE_COPROC does not have correct feature bits set"
#endif
/* { dg-require-effective-target arm_coproc2_ok } */
#include "arm_acle.h"
-#if (__ARM_FEATURE_COPROC & 0x2) == 0
+#if (__ARM_ARCH < 8 || !defined (__ARM_ARCH_ISA_ARM)) \
+ && (__ARM_FEATURE_COPROC & 0x2) == 0
#error "__ARM_FEATURE_COPROC does not have correct feature bits set"
#endif
/* { dg-require-effective-target arm_coproc3_ok } */
#include "arm_acle.h"
-#if (__ARM_FEATURE_COPROC & 0x4) == 0
+#if (__ARM_ARCH < 8 || !defined (__ARM_ARCH_ISA_ARM)) \
+ && (__ARM_FEATURE_COPROC & 0x4) == 0
#error "__ARM_FEATURE_COPROC does not have correct feature bits set"
#endif
/* { dg-require-effective-target arm_coproc4_ok } */
#include "arm_acle.h"
-#if (__ARM_FEATURE_COPROC & 0x8) == 0
+#if (__ARM_ARCH < 8 || !defined (__ARM_ARCH_ISA_ARM)) \
+ && (__ARM_FEATURE_COPROC & 0x8) == 0
#error "__ARM_FEATURE_COPROC does not have correct feature bits set"
#endif
/* { dg-require-effective-target arm_coproc1_ok } */
#include "arm_acle.h"
-#if (__ARM_FEATURE_COPROC & 0x1) == 0
+#if (__ARM_ARCH < 8 || !defined (__ARM_ARCH_ISA_ARM)) \
+ && (__ARM_FEATURE_COPROC & 0x1) == 0
#error "__ARM_FEATURE_COPROC does not have correct feature bits set"
#endif
/* { dg-require-effective-target arm_coproc2_ok } */
#include "arm_acle.h"
-#if (__ARM_FEATURE_COPROC & 0x2) == 0
+#if (__ARM_ARCH < 8 || !defined (__ARM_ARCH_ISA_ARM)) \
+ && (__ARM_FEATURE_COPROC & 0x2) == 0
#error "__ARM_FEATURE_COPROC does not have correct feature bits set"
#endif
/* { dg-require-effective-target arm_coproc3_ok } */
#include "arm_acle.h"
-#if (__ARM_FEATURE_COPROC & 0x4) == 0
+#if (__ARM_ARCH < 8 || !defined (__ARM_ARCH_ISA_ARM)) \
+ && (__ARM_FEATURE_COPROC & 0x4) == 0
#error "__ARM_FEATURE_COPROC does not have correct feature bits set"
#endif
/* { dg-require-effective-target arm_coproc4_ok } */
#include "arm_acle.h"
-#if (__ARM_FEATURE_COPROC & 0x8) == 0
+#if (__ARM_ARCH < 8 || !defined (__ARM_ARCH_ISA_ARM)) \
+ && (__ARM_FEATURE_COPROC & 0x8) == 0
#error "__ARM_FEATURE_COPROC does not have correct feature bits set"
#endif
/* { dg-require-effective-target arm_coproc1_ok } */
#include "arm_acle.h"
-#if (__ARM_FEATURE_COPROC & 0x1) == 0
+#if (__ARM_ARCH < 8 || !defined (__ARM_ARCH_ISA_ARM)) \
+ && (__ARM_FEATURE_COPROC & 0x1) == 0
#error "__ARM_FEATURE_COPROC does not have correct feature bits set"
#endif
/* { dg-require-effective-target arm_coproc2_ok } */
#include "arm_acle.h"
-#if (__ARM_FEATURE_COPROC & 0x2) == 0
+#if (__ARM_ARCH < 8 || !defined (__ARM_ARCH_ISA_ARM)) \
+ && (__ARM_FEATURE_COPROC & 0x2) == 0
#error "__ARM_FEATURE_COPROC does not have correct feature bits set"
#endif
/* { dg-require-effective-target arm_coproc2_ok } */
#include "arm_acle.h"
-#if (__ARM_FEATURE_COPROC & 0x2) == 0
+#if (__ARM_ARCH < 8 || !defined (__ARM_ARCH_ISA_ARM)) \
+ && (__ARM_FEATURE_COPROC & 0x2) == 0
#error "__ARM_FEATURE_COPROC does not have correct feature bits set"
#endif
/* { dg-require-effective-target arm_coproc1_ok } */
#include "arm_acle.h"
-#if (__ARM_FEATURE_COPROC & 0x1) == 0
+#if (__ARM_ARCH < 8 || !defined (__ARM_ARCH_ISA_ARM)) \
+ && (__ARM_FEATURE_COPROC & 0x1) == 0
#error "__ARM_FEATURE_COPROC does not have correct feature bits set"
#endif
} "-mrdrnd" ]
}
-# Return 1 if the target supports coprocessor instructions: cdp, ldc, stc, mcr and
-# mrc.
+# Return 1 if the target supports coprocessor instructions: cdp, ldc, ldcl,
+# stc, stcl, mcr and mrc.
proc check_effective_target_arm_coproc1_ok_nocache { } {
if { ![istarget arm*-*-*] } {
return 0
return 0
}
return [check_no_compiler_messages_nocache arm_coproc2_ok assembly {
- #if __ARM_ARCH < 5
+ #if (__thumb__ && !__thumb2__) || __ARM_ARCH < 5
#error FOO
#endif
}]
return 0
}
return [check_no_compiler_messages_nocache arm_coproc3_ok assembly {
- #if __ARM_ARCH < 6 && !defined (__ARM_ARCH_5TE__)
+ #if (__thumb__ && !__thumb2__) \
+ || (__ARM_ARCH < 6 && !defined (__ARM_ARCH_5TE__))
#error FOO
#endif
}]
return 0
}
return [check_no_compiler_messages_nocache arm_coproc4_ok assembly {
- #if __ARM_ARCH < 6
+ #if (__thumb__ && !__thumb2__) || __ARM_ARCH < 6
#error FOO
#endif
}]