This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH][AARCH64]Add ACLE more predefined macros
- From: Renlin Li <renlin dot li at arm dot com>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Cc: ramana Radhakrishnan <ramana dot radhakrishnan at arm dot com>, marcus Shawcroft <Marcus dot Shawcroft at arm dot com>
- Date: Mon, 17 Nov 2014 17:33:58 +0000
- Subject: [PATCH][AARCH64]Add ACLE more predefined macros
- Authentication-results: sourceware.org; auth=none
Hi all,
This is a simple patch to add more conditional macros defined ACLE 2.0.
aarch64-none-elf target is tested on the model, no new issues.
Is this Okay for trunk?
gcc/ChangeLog:
2014-11-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.diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h
index 81688e1..d8f6a42 100644
--- a/gcc/config/aarch64/aarch64.h
+++ b/gcc/config/aarch64/aarch64.h
@@ -36,6 +36,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); \
@@ -50,10 +52,19 @@
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) \