diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2011-12-28 15:47:06 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2011-12-28 15:47:06 +0000 |
commit | b406669fea7c8db83a377f368f1689c848296974 (patch) | |
tree | a517044ba7da8b5142b3dbc0abcc5c0715be2451 /lib/Frontend/InitPreprocessor.cpp | |
parent | 5294c792c715b8dba26711be482b7a32be04d4d5 (diff) |
Add a target hook for FLT_EVAL_METHOD and use it to set the value on x86 with sse disabled.
x87 math evaluates everything with 80 bits precision, so we have to set FLT_EVAL_METHOD
to "2".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147311 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/InitPreprocessor.cpp')
-rw-r--r-- | lib/Frontend/InitPreprocessor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Frontend/InitPreprocessor.cpp b/lib/Frontend/InitPreprocessor.cpp index c67eba40b5..f601f3d73a 100644 --- a/lib/Frontend/InitPreprocessor.cpp +++ b/lib/Frontend/InitPreprocessor.cpp @@ -513,7 +513,7 @@ static void InitializePredefinedMacros(const TargetInfo &TI, } // Macros to control C99 numerics and <float.h> - Builder.defineMacro("__FLT_EVAL_METHOD__", "0"); + Builder.defineMacro("__FLT_EVAL_METHOD__", Twine(TI.getFloatEvalMethod())); Builder.defineMacro("__FLT_RADIX__", "2"); int Dig = PickFP(&TI.getLongDoubleFormat(), -1/*FIXME*/, 17, 21, 33, 36); Builder.defineMacro("__DECIMAL_DIG__", Twine(Dig)); |