summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorCharlie Turner <charlie.turner@arm.com>2014-12-12 11:59:18 +0000
committerCharlie Turner <charlie.turner@arm.com>2014-12-12 11:59:18 +0000
commit1a53996c316761894fbc0e542fab178a14f7064c (patch)
treedefb0ade0acd14fb7d6c2f4db1f06f94406c87c8 /llvm/lib/Target
parent5cb121d4380d61bfb10f0e2962a62b4c2c410179 (diff)
downloadbcm5719-llvm-1a53996c316761894fbc0e542fab178a14f7064c.tar.gz
bcm5719-llvm-1a53996c316761894fbc0e542fab178a14f7064c.zip
Emit Tag_ABI_FP_16bit_format build attribute.
The __fp16 type is unconditionally exposed. Since -mfp16-format is not yet supported, there is not a user switch to change this behaviour. This build attribute should capture the default behaviour of the compiler, which is to expose the IEEE 754 version of __fp16. When -mfp16-format is emitted, that will be the way to control the value of this build attribute. Change-Id: I8a46641ff0fd2ef8ad0af5f482a6d1af2ac3f6b0 llvm-svn: 224115
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/ARM/ARMAsmPrinter.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp
index d3fdbcca2dd..0300f5875ca 100644
--- a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp
+++ b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp
@@ -782,6 +782,13 @@ void ARMAsmPrinter::emitAttributes() {
if (Subtarget->hasFP16())
ATS.emitAttribute(ARMBuildAttrs::FP_HP_extension, ARMBuildAttrs::AllowHPFP);
+ // FIXME: To support emitting this build attribute as GCC does, the
+ // -mfp16-format option and associated plumbing must be
+ // supported. For now the __fp16 type is exposed by default, so this
+ // attribute should be emitted with value 1.
+ ATS.emitAttribute(ARMBuildAttrs::ABI_FP_16bit_format,
+ ARMBuildAttrs::FP16FormatIEEE);
+
if (Subtarget->hasMPExtension())
ATS.emitAttribute(ARMBuildAttrs::MPextension_use, ARMBuildAttrs::AllowMP);
OpenPOWER on IntegriCloud