[cfe-commits] r147669 - /cfe/trunk/lib/Basic/Targets.cpp
Joerg Sonnenberger
joerg at bec.de
Fri Jan 6 10:32:26 PST 2012
Author: joerg
Date: Fri Jan 6 12:32:26 2012
New Revision: 147669
URL: http://llvm.org/viewvc/llvm-project?rev=147669&view=rev
Log:
__FLT_EVAL_METHOD__ should be 1 on NetBSD/i386, since it defaults to
"double" rounding.
Modified:
cfe/trunk/lib/Basic/Targets.cpp
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=147669&r1=147668&r2=147669&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Fri Jan 6 12:32:26 2012
@@ -2185,6 +2185,20 @@
} // end anonymous namespace
namespace {
+class NetBSDI386TargetInfo : public NetBSDTargetInfo<X86_32TargetInfo> {
+public:
+ NetBSDI386TargetInfo(const std::string &triple) :
+ NetBSDTargetInfo<X86_32TargetInfo>(triple) {
+ }
+
+ virtual unsigned getFloatEvalMethod() const {
+ // NetBSD defaults to "double" rounding
+ return 1;
+ }
+};
+} // end anonymous namespace
+
+namespace {
class OpenBSDI386TargetInfo : public OpenBSDTargetInfo<X86_32TargetInfo> {
public:
OpenBSDI386TargetInfo(const std::string& triple) :
@@ -3889,7 +3903,7 @@
case llvm::Triple::DragonFly:
return new DragonFlyBSDTargetInfo<X86_32TargetInfo>(T);
case llvm::Triple::NetBSD:
- return new NetBSDTargetInfo<X86_32TargetInfo>(T);
+ return new NetBSDI386TargetInfo(T);
case llvm::Triple::OpenBSD:
return new OpenBSDI386TargetInfo(T);
case llvm::Triple::FreeBSD:
More information about the cfe-commits
mailing list