[llvm-commits] CVS: llvm/include/llvm/Support/MathExtras.h
Chris Lattner
lattner at cs.uiuc.edu
Tue Aug 2 12:22:02 PDT 2005
Changes in directory llvm/include/llvm/Support:
MathExtras.h updated: 1.17 -> 1.18
---
Log message:
Fix the non-gcc 4.0 path to compile
---
Diffs of the changes: (+7 -5)
MathExtras.h | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
Index: llvm/include/llvm/Support/MathExtras.h
diff -u llvm/include/llvm/Support/MathExtras.h:1.17 llvm/include/llvm/Support/MathExtras.h:1.18
--- llvm/include/llvm/Support/MathExtras.h:1.17 Tue Aug 2 14:15:30 2005
+++ llvm/include/llvm/Support/MathExtras.h Tue Aug 2 14:21:51 2005
@@ -88,7 +88,7 @@
// PowerPC is defined for __builtin_clz(0)
#if defined(__ppc__) || defined(__ppc64__)
if (!Value) return 32;
-#endif
+ #endif
Count = __builtin_clz(Value);
#else
if (!Value) return 32;
@@ -117,7 +117,8 @@
if (!Value) return 64;
#endif
Count = __builtin_clzll(Value);
- #elif sizeof(long) == sizeof(int64_t)
+ #else
+ if (sizeof(long) == sizeof(int64_t)) {
if (!Value) return 64;
Count = 0;
// bisecton method for count leading zeros
@@ -127,8 +128,8 @@
Count |= Shift;
Value = Tmp;
}
-}
- #else
+ }
+ } else {
// get hi portion
unsigned Hi = Hi_32(Value);
@@ -142,7 +143,8 @@
// same as 32 bit value
Count = CountLeadingZeros_32(Lo);
}
- #endif
+ }
+#endif
return Count;
}
More information about the llvm-commits
mailing list