-2017-07-20 Jakub Jelinek <jakub@redhat.com>
+2017-06-20 Prakhar Bahuguna <prakhar.bahuguna@arm.com>
+
+ * config/arm/arm-c.c (arm_cpu_builtins): New block to define
+ __ARM_FEATURE_COPROC according to support.
+
+2017-06-20 Jakub Jelinek <jakub@redhat.com>
* tree-chkp.c (chkp_get_hard_register_var_fake_base_address):
Rewritten to avoid overflow for > 32-bit pointers.
def_or_undef_macro (pfile, "__ARM_FEATURE_IDIV", TARGET_IDIV);
def_or_undef_macro (pfile, "__ARM_ASM_SYNTAX_UNIFIED__", inline_asm_unified);
+
+ if (TARGET_32BIT && arm_arch4 && !(arm_arch8 && arm_arch_notm))
+ {
+ int coproc_level = 0x1;
+
+ if (arm_arch5)
+ coproc_level |= 0x2;
+ if (arm_arch5e)
+ coproc_level |= 0x4;
+ if (arm_arch6)
+ coproc_level |= 0x8;
+
+ builtin_define_with_int_value ("__ARM_FEATURE_COPROC", coproc_level);
+ }
+ else
+ cpp_undef (pfile, "__ARM_FEATURE_COPROC");
}
void
+2017-06-20 Prakhar Bahuguna <prakhar.bahuguna@arm.com>
+
+ * gcc.target/arm/acle/cdp.c: Add feature macro bitmap test.
+ * 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.
+
2017-06-20 Jakub Jelinek <jakub@redhat.com>
PR target/81121
/* { dg-require-effective-target arm_coproc1_ok } */
#include "arm_acle.h"
+#if (__ARM_FEATURE_COPROC & 0x1) == 0
+ #error "__ARM_FEATURE_COPROC does not have correct feature bits set"
+#endif
void test_cdp (void)
{
/* { dg-require-effective-target arm_coproc2_ok } */
#include "arm_acle.h"
+#if (__ARM_FEATURE_COPROC & 0x2) == 0
+ #error "__ARM_FEATURE_COPROC does not have correct feature bits set"
+#endif
void test_cdp2 (void)
{
/* { dg-require-effective-target arm_coproc1_ok } */
#include "arm_acle.h"
+#if (__ARM_FEATURE_COPROC & 0x1) == 0
+ #error "__ARM_FEATURE_COPROC does not have correct feature bits set"
+#endif
extern void * p;
/* { dg-require-effective-target arm_coproc2_ok } */
#include "arm_acle.h"
+#if (__ARM_FEATURE_COPROC & 0x2) == 0
+ #error "__ARM_FEATURE_COPROC does not have correct feature bits set"
+#endif
extern void * p;
/* { dg-require-effective-target arm_coproc2_ok } */
#include "arm_acle.h"
+#if (__ARM_FEATURE_COPROC & 0x2) == 0
+ #error "__ARM_FEATURE_COPROC does not have correct feature bits set"
+#endif
extern void * p;
/* { dg-require-effective-target arm_coproc1_ok } */
#include "arm_acle.h"
+#if (__ARM_FEATURE_COPROC & 0x1) == 0
+ #error "__ARM_FEATURE_COPROC does not have correct feature bits set"
+#endif
extern void * p;
/* { dg-require-effective-target arm_coproc1_ok } */
#include "arm_acle.h"
+#if (__ARM_FEATURE_COPROC & 0x1) == 0
+ #error "__ARM_FEATURE_COPROC does not have correct feature bits set"
+#endif
void test_mcr (uint32_t a)
{
/* { dg-require-effective-target arm_coproc2_ok } */
#include "arm_acle.h"
+#if (__ARM_FEATURE_COPROC & 0x2) == 0
+ #error "__ARM_FEATURE_COPROC does not have correct feature bits set"
+#endif
void test_mcr2 (uint32_t a)
{
/* { dg-require-effective-target arm_coproc3_ok } */
#include "arm_acle.h"
+#if (__ARM_FEATURE_COPROC & 0x4) == 0
+ #error "__ARM_FEATURE_COPROC does not have correct feature bits set"
+#endif
void test_mcrr (uint64_t a)
{
/* { dg-require-effective-target arm_coproc4_ok } */
#include "arm_acle.h"
+#if (__ARM_FEATURE_COPROC & 0x8) == 0
+ #error "__ARM_FEATURE_COPROC does not have correct feature bits set"
+#endif
void test_mcrr2 (uint64_t a)
{
/* { dg-require-effective-target arm_coproc1_ok } */
#include "arm_acle.h"
+#if (__ARM_FEATURE_COPROC & 0x1) == 0
+ #error "__ARM_FEATURE_COPROC does not have correct feature bits set"
+#endif
uint32_t test_mrc (void)
{
/* { dg-require-effective-target arm_coproc2_ok } */
#include "arm_acle.h"
+#if (__ARM_FEATURE_COPROC & 0x2) == 0
+ #error "__ARM_FEATURE_COPROC does not have correct feature bits set"
+#endif
uint32_t test_mrc2 (void)
{
/* { dg-require-effective-target arm_coproc3_ok } */
#include "arm_acle.h"
+#if (__ARM_FEATURE_COPROC & 0x4) == 0
+ #error "__ARM_FEATURE_COPROC does not have correct feature bits set"
+#endif
uint64_t test_mrrc (void)
{
/* { dg-require-effective-target arm_coproc4_ok } */
#include "arm_acle.h"
+#if (__ARM_FEATURE_COPROC & 0x8) == 0
+ #error "__ARM_FEATURE_COPROC does not have correct feature bits set"
+#endif
uint64_t test_mrrc2 (void)
{
/* { dg-require-effective-target arm_coproc1_ok } */
#include "arm_acle.h"
+#if (__ARM_FEATURE_COPROC & 0x1) == 0
+ #error "__ARM_FEATURE_COPROC does not have correct feature bits set"
+#endif
extern void * p;
/* { dg-require-effective-target arm_coproc2_ok } */
#include "arm_acle.h"
+#if (__ARM_FEATURE_COPROC & 0x2) == 0
+ #error "__ARM_FEATURE_COPROC does not have correct feature bits set"
+#endif
extern void * p;
/* { dg-require-effective-target arm_coproc2_ok } */
#include "arm_acle.h"
+#if (__ARM_FEATURE_COPROC & 0x2) == 0
+ #error "__ARM_FEATURE_COPROC does not have correct feature bits set"
+#endif
extern void * p;
/* { dg-require-effective-target arm_coproc1_ok } */
#include "arm_acle.h"
+#if (__ARM_FEATURE_COPROC & 0x1) == 0
+ #error "__ARM_FEATURE_COPROC does not have correct feature bits set"
+#endif
extern void * p;