Skip to content

Commit

Permalink
[AArch64] Define the macro __ARM_FP16_ARGS
Browse files Browse the repository at this point in the history
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

llvm-svn: 245833
  • Loading branch information
Keith Walker committed Aug 24, 2015
1 parent 284f2bf commit 71ad47f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions clang/lib/Basic/Targets.cpp
Expand Up @@ -5176,6 +5176,7 @@ class AArch64TargetInfo : public TargetInfo {
// 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");
Expand Down
1 change: 1 addition & 0 deletions clang/test/Preprocessor/aarch64-target-features.c
Expand Up @@ -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
Expand Down

0 comments on commit 71ad47f

Please sign in to comment.