# HG changeset patch
# User t_mrc-ct@users.sourceforge.jp
# Date 1384097907 -32400
# Branch GECKO2450_2014042411_RELBRANCH
# Node ID b16ef47c6e7b4588c5d62eb12030df7df8735947
# Parent  222ecac34271b8a049475878974d05d630a91e90
M572983 patch for PPC_OSX

diff --git a/js/src/ctypes/CTypes.cpp b/js/src/ctypes/CTypes.cpp
--- a/js/src/ctypes/CTypes.cpp
+++ b/js/src/ctypes/CTypes.cpp
@@ -1398,20 +1398,20 @@
     return d > 0x7fffffffffffffffui64 ?
            uint64_t(d - 0x8000000000000000ui64) + 0x8000000000000000ui64 :
            uint64_t(d);
   }
 };
 #endif
 
 // C++ doesn't guarantee that exact values are the only ones that will
-// round-trip. In fact, on some platforms, including SPARC, there are pairs of
+// round-trip. In fact, on some platforms, including SPARC and PPC_OSX, there are pairs of
 // values, a uint64_t and a double, such that neither value is exactly
 // representable in the other type, but they cast to each other.
-#ifdef SPARC
+#if defined(SPARC) || defined(JS_CPU_PPC_OSX)
 // Simulate x86 overflow behavior
 template<>
 struct ConvertImpl<uint64_t, double> {
   static JS_ALWAYS_INLINE uint64_t Convert(double d) {
     return d >= 0xffffffffffffffff ?
            0x8000000000000000 : uint64_t(d);
   }
 };
