r245833 - [AArch64] Define the macro __ARM_FP16_ARGS

Keith Walker via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 24 03:11:15 PDT 2015


Author: kwalker
Date: Mon Aug 24 05:11:14 2015
New Revision: 245833

URL: http://llvm.org/viewvc/llvm-project?rev=245833&view=rev
Log:
[AArch64] Define the macro __ARM_FP16_ARGS

The ACLE (ARM C Language Extensions) 2.0 defines that the predefined macro
__ARM_FP16_ARGS should be defined if __fp16 can be used as an argument and
result.

The support for __fp16 to be used as an argument and result is already
implemented for AArch64 so this change is just adding the missing macro.

Differential Revision: http://reviews.llvm.org/D12240

Modified:
    cfe/trunk/lib/Basic/Targets.cpp
    cfe/trunk/test/Preprocessor/aarch64-target-features.c

Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=245833&r1=245832&r2=245833&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Mon Aug 24 05:11:14 2015
@@ -5176,6 +5176,7 @@ public:
     // PCS specifies this for SysV variants, which is all we support. Other ABIs
     // may choose __ARM_FP16_FORMAT_ALTERNATIVE.
     Builder.defineMacro("__ARM_FP16_FORMAT_IEEE");
+    Builder.defineMacro("__ARM_FP16_ARGS");
 
     if (Opts.FastMath || Opts.FiniteMathOnly)
       Builder.defineMacro("__ARM_FP_FAST");

Modified: cfe/trunk/test/Preprocessor/aarch64-target-features.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/aarch64-target-features.c?rev=245833&r1=245832&r2=245833&view=diff
==============================================================================
--- cfe/trunk/test/Preprocessor/aarch64-target-features.c (original)
+++ cfe/trunk/test/Preprocessor/aarch64-target-features.c Mon Aug 24 05:11:14 2015
@@ -19,6 +19,7 @@
 // CHECK: __ARM_FEATURE_NUMERIC_MAXMIN 1
 // CHECK: __ARM_FEATURE_UNALIGNED 1
 // CHECK: __ARM_FP 0xe
+// CHECK: __ARM_FP16_ARGS 1
 // CHECK: __ARM_FP16_FORMAT_IEEE 1
 // CHECK-NOT: __ARM_FP_FAST 1
 // CHECK: __ARM_FP_FENV_ROUNDING 1




More information about the cfe-commits mailing list