Index: src/x64/lithium-x64.cc |
diff --git a/src/x64/lithium-x64.cc b/src/x64/lithium-x64.cc |
index bb2ecc06b8e4e374e838cf2847f08221ed9f8faa..955a92f029d8148a7354350ff361ee1ed27a7f73 100644 |
--- a/src/x64/lithium-x64.cc |
+++ b/src/x64/lithium-x64.cc |
@@ -331,6 +331,16 @@ void LAccessArgumentsAt::PrintDataTo(StringStream* stream) { |
int LPlatformChunk::GetNextSpillIndex(RegisterKind kind) { |
+ if (kind == DOUBLE_REGISTERS && kDoubleSize == 2 * kPointerSize) { |
+ // Skip a slot if for a double-width slot for x32 port. |
+ spill_slot_count_++; |
+ // The spill slot's address is at rbp - (index + 1) * kPointerSize - |
+ // StandardFrameConstants::kFixedFrameSizeFromFp. kFixedFrameSizeFromFp is |
+ // 2 * kPointerSize, if rbp is aligned at 8-byte boundary, the below "|= 1" |
+ // will make sure the spilled doubles are aligned at 8-byte boundary. |
+ // TODO(haitao): make sure rbp is aligned at 8-byte boundary for x32 port. |
+ spill_slot_count_ |= 1; |
+ } |
return spill_slot_count_++; |
} |