Bug 1022033 - Disable NS_lroundup30 on clang-cl; r=jrmuizel
authorEhsan Akhgari <ehsan@mozilla.com>
Fri, 06 Jun 2014 20:13:48 -0400
changeset 206581 299ed3d227d4429111c6f2ea316d30040f23197c
parent 206580 115ea0cc4b22c9b30ff5545dc1d5f33c89cddbbe
child 206582 e2714481c419a8882a3918a04da888a1f452b297
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1022033
milestone32.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1022033 - Disable NS_lroundup30 on clang-cl; r=jrmuizel This function contains inline assembly which clang-cl can't compile yet.
gfx/src/nsCoord.h
xpcom/ds/nsMathUtils.h
--- a/gfx/src/nsCoord.h
+++ b/gfx/src/nsCoord.h
@@ -54,26 +54,26 @@ inline void VERIFY_COORD(nscoord aCoord)
 #ifdef NS_COORD_IS_FLOAT
   NS_ASSERTION(floorf(aCoord) == aCoord,
                "Coords cannot have fractions");
 #endif
 }
 
 inline nscoord NSToCoordRound(float aValue)
 {
-#if defined(XP_WIN32) && defined(_M_IX86) && !defined(__GNUC__)
+#if defined(XP_WIN32) && defined(_M_IX86) && !defined(__GNUC__) && !defined(__clang__)
   return NS_lroundup30(aValue);
 #else
   return nscoord(floorf(aValue + 0.5f));
 #endif /* XP_WIN32 && _M_IX86 && !__GNUC__ */
 }
 
 inline nscoord NSToCoordRound(double aValue)
 {
-#if defined(XP_WIN32) && defined(_M_IX86) && !defined(__GNUC__)
+#if defined(XP_WIN32) && defined(_M_IX86) && !defined(__GNUC__) && !defined(__clang__)
   return NS_lroundup30((float)aValue);
 #else
   return nscoord(floor(aValue + 0.5f));
 #endif /* XP_WIN32 && _M_IX86 && !__GNUC__ */
 }
 
 inline nscoord NSToCoordRoundWithClamp(float aValue)
 {
--- a/xpcom/ds/nsMathUtils.h
+++ b/xpcom/ds/nsMathUtils.h
@@ -30,17 +30,17 @@ inline float NS_roundf(float x)
 inline int32_t NS_lround(double x)
 {
     return x >= 0.0 ? int32_t(x + 0.5) : int32_t(x - 0.5);
 }
 
 /* NS_roundup30 rounds towards infinity for positive and       */
 /* negative numbers.                                           */
 
-#if defined(XP_WIN32) && defined(_M_IX86) && !defined(__GNUC__)
+#if defined(XP_WIN32) && defined(_M_IX86) && !defined(__GNUC__) && !defined(__clang__)
 inline int32_t NS_lroundup30(float x)
 {
     /* Code derived from Laurent de Soras' paper at             */
     /* http://ldesoras.free.fr/doc/articles/rounding_en.pdf     */
 
     /* Rounding up on Windows is expensive using the float to   */
     /* int conversion and the floor function. A faster          */
     /* approach is to use f87 rounding while assuming the       */