[llvm-commits] [llvm] r99677 - /llvm/trunk/lib/Support/APInt.cpp
Chris Lattner
sabre at nondot.org
Fri Mar 26 16:54:15 PDT 2010
Author: lattner
Date: Fri Mar 26 18:54:15 2010
New Revision: 99677
URL: http://llvm.org/viewvc/llvm-project?rev=99677&view=rev
Log:
improve portability to minix, patch by
Kees van Reeuwijk for PR6704
Modified:
llvm/trunk/lib/Support/APInt.cpp
Modified: llvm/trunk/lib/Support/APInt.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/APInt.cpp?rev=99677&r1=99676&r2=99677&view=diff
==============================================================================
--- llvm/trunk/lib/Support/APInt.cpp (original)
+++ llvm/trunk/lib/Support/APInt.cpp Fri Mar 26 18:54:15 2010
@@ -1382,8 +1382,8 @@
// libc sqrt function which will probably use a hardware sqrt computation.
// This should be faster than the algorithm below.
if (magnitude < 52) {
-#ifdef _MSC_VER
- // Amazingly, VC++ doesn't have round().
+#if defined( _MSC_VER ) || defined(_MINIX)
+ // Amazingly, VC++ and Minix don't have round().
return APInt(BitWidth,
uint64_t(::sqrt(double(isSingleWord()?VAL:pVal[0]))) + 0.5);
#else
More information about the llvm-commits
mailing list