Index: src/deoptimizer.h |
diff --git a/src/deoptimizer.h b/src/deoptimizer.h |
index 5d401deedd6c8d9f06c15b7f9b61a3f352680176..4bbb8af5a5c1771cdcbb007e8852ac37f7ce1993 100644 |
--- a/src/deoptimizer.h |
+++ b/src/deoptimizer.h |
@@ -17,19 +17,15 @@ namespace internal { |
static inline double read_double_value(Address p) { |
-#ifdef V8_HOST_CAN_READ_UNALIGNED |
- return Memory::double_at(p); |
-#else // V8_HOST_CAN_READ_UNALIGNED |
// Prevent gcc from using load-double (mips ldc1) on (possibly) |
// non-64-bit aligned address. |
union conversion { |
double d; |
uint32_t u[2]; |
} c; |
- c.u[0] = *reinterpret_cast<uint32_t*>(p); |
- c.u[1] = *reinterpret_cast<uint32_t*>(p + 4); |
+ c.u[0] = Memory::uint32_at(p); |
Jakob Kummerow
2014/09/12 11:08:44
Since Memory::uint32_at does a reinterpret_cast<ui
Sven Panne
2014/09/12 13:12:08
Even simpler: Just use memcpy...
|
+ c.u[1] = Memory::uint32_at(p + 4); |
return c.d; |
-#endif // V8_HOST_CAN_READ_UNALIGNED |
} |