diff options
| author | Charlie Turner <charlie.turner@arm.com> | 2014-12-03 08:12:26 +0000 |
|---|---|---|
| committer | Charlie Turner <charlie.turner@arm.com> | 2014-12-03 08:12:26 +0000 |
| commit | f02c92489abc5f9eff3397c8916955cb0fb6a7ef (patch) | |
| tree | 10979b8ac28da5eabca32c9c53771ac34385aeec /llvm/lib | |
| parent | 1620a69fe8c6ba797dcaec4078ad25cd66047093 (diff) | |
| download | bcm5719-llvm-f02c92489abc5f9eff3397c8916955cb0fb6a7ef.tar.gz bcm5719-llvm-f02c92489abc5f9eff3397c8916955cb0fb6a7ef.zip | |
Emit ABI_FP_rounding attribute.
LLVM understands a -enable-sign-dependent-rounding-fp-math codegen option. When
the user has specified this option, the Tag_ABI_FP_rounding attribute should be
emitted with value 1. This option currently does not appear to disable
transformations and optimizations that assume default floating point rounding
behavior, AFAICT, but the intention should be recorded in the build attributes,
regardless of what the compiler actually does with the intention.
Change-Id: If838578df3dc652b6f2796b8d152545674bcb30e
llvm-svn: 223218
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/ARM/ARMAsmPrinter.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp index d24ffad1a08..49a33774467 100644 --- a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp +++ b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp @@ -698,6 +698,12 @@ void ARMAsmPrinter::emitAttributes() { ARMBuildAttrs::IEEEDenormals); ATS.emitAttribute(ARMBuildAttrs::ABI_FP_exceptions, ARMBuildAttrs::Allowed); + + // If the user has permitted this code to choose the IEEE 754 + // rounding at run-time, emit the rounding attribute. + if (TM.Options.HonorSignDependentRoundingFPMathOption) + ATS.emitAttribute(ARMBuildAttrs::ABI_FP_rounding, + ARMBuildAttrs::Allowed); } else { if (!Subtarget->hasVFP2()) { // When the target doesn't have an FPU (by design or |

