This is simple patch to add more conditional macros defined in ACLE 2.0.
authorRenlin Li <renlin.li@arm.com>
Wed, 19 Nov 2014 12:47:26 +0000 (12:47 +0000)
committerRenlin Li <renlin@gcc.gnu.org>
Wed, 19 Nov 2014 12:47:26 +0000 (12:47 +0000)
2014-10-17  Renlin Li  <Renlin.Li@arm.com>

    * config/aarch64/aarch64.h (TARGET_CPU_CPP_BUILTINS): Define __ARM_FP_FAST,
    __ARM_FEATURE_FMA, __ARM_FP, __ARM_FEATURE_NUMERIC_MAXMIN, __ARM_NEON_FP.

From-SVN: r217768

gcc/ChangeLog
gcc/config/aarch64/aarch64.h

index 0e9638888d6a91bc53f58336a425d9435ba05dd0..c5bd5e73ac0df4cb2430ec35eef780a7f9f6914f 100644 (file)
@@ -1,3 +1,8 @@
+2014-11-19  Renlin Li  <renlin.li@arm.com>
+
+    * config/aarch64/aarch64.h (TARGET_CPU_CPP_BUILTINS): Define __ARM_FP_FAST,
+       __ARM_FEATURE_FMA, __ARM_FP, __ARM_FEATURE_NUMERIC_MAXMIN, __ARM_NEON_FP.
+
 2014-11-19  Marek Polacek  <polacek@redhat.com>
 
        PR sanitizer/63879
index c046b43c6625bec05a7993f1cb53cbdc7ac49ddd..bbe33a92983566d0669b0681b79cb20da4f742c1 100644 (file)
@@ -38,6 +38,8 @@
       builtin_define ("__ARM_FEATURE_CLZ");             \
       builtin_define ("__ARM_FEATURE_IDIV");            \
       builtin_define ("__ARM_FEATURE_UNALIGNED");       \
+      if (flag_unsafe_math_optimizations)               \
+        builtin_define ("__ARM_FP_FAST");               \
       builtin_define ("__ARM_PCS_AAPCS64");             \
       builtin_define_with_int_value                     \
         ("__ARM_SIZEOF_WCHAR_T", WCHAR_TYPE_SIZE / 8);  \
       else                                             \
        builtin_define ("__AARCH64EL__");               \
                                                        \
-      if (TARGET_SIMD)                                 \
-       builtin_define ("__ARM_NEON");                  \
-                                                       \
-      if (TARGET_CRC32)                                \
+      if (TARGET_FLOAT)                                         \
+        {                                                       \
+          builtin_define ("__ARM_FEATURE_FMA");                 \
+          builtin_define_with_int_value ("__ARM_FP", 0x0C);     \
+        }                                                       \
+      if (TARGET_SIMD)                                          \
+        {                                                       \
+          builtin_define ("__ARM_FEATURE_NUMERIC_MAXMIN");      \
+          builtin_define ("__ARM_NEON");                       \
+          builtin_define_with_int_value ("__ARM_NEON_FP", 0x0C);\
+        }                                                       \
+                                                               \
+      if (TARGET_CRC32)                                        \
        builtin_define ("__ARM_FEATURE_CRC32");         \
                                                        \
       switch (aarch64_cmodel)                          \