Index: src/deoptimizer.h |
diff --git a/src/deoptimizer.h b/src/deoptimizer.h |
index 3cf70466c0c126b291dff7d081700f2312428782..43a073f2b26bc031f623570b21bdb88f6eafacf5 100644 |
--- a/src/deoptimizer.h |
+++ b/src/deoptimizer.h |
@@ -368,7 +368,20 @@ class FrameDescription { |
} |
double GetDoubleFrameSlot(unsigned offset) { |
- return *reinterpret_cast<double*>(GetFrameSlotPointer(offset)); |
+ intptr_t* ptr = GetFrameSlotPointer(offset); |
+#if V8_TARGET_ARCH_MIPS |
+ // Prevent gcc from using load-double (mips ldc1) on (possibly) |
+ // non-64-bit aligned double. Uses two lwc1 instructions. |
+ union conversion { |
+ double d; |
+ uint32_t u[2]; |
+ } c; |
+ c.u[0] = *reinterpret_cast<uint32_t*>(ptr); |
+ c.u[1] = *(reinterpret_cast<uint32_t*>(ptr) + 1); |
+ return c.d; |
+#else |
+ return *reinterpret_cast<double*>(ptr); |
+#endif |
} |
void SetFrameSlot(unsigned offset, intptr_t value) { |