Index: src/conversions-inl.h |
diff --git a/src/conversions-inl.h b/src/conversions-inl.h |
index e503eb5027a0456795fd6cacdec32782e8595326..af9576af313285bc5d9a423dbbed1b6fa140c146 100644 |
--- a/src/conversions-inl.h |
+++ b/src/conversions-inl.h |
@@ -75,7 +75,11 @@ inline unsigned int FastD2UI(double x) { |
if (x < k2Pow52) { |
x += k2Pow52; |
uint32_t result; |
+#ifndef V8_TARGET_BIG_ENDIAN |
Address mantissa_ptr = reinterpret_cast<Address>(&x); |
+#else |
+ Address mantissa_ptr = reinterpret_cast<Address>(&x) + kIntSize; |
+#endif |
// Copy least significant 32 bits of mantissa. |
OS::MemCopy(&result, mantissa_ptr, sizeof(result)); |
return negative ? ~result + 1 : result; |