From 88e8db4d417563f73cae09d76d156e57834c3c19 Mon Sep 17 00:00:00 2001 From: "haitao.feng@intel.com" Date: Tue, 24 Jun 2014 03:41:45 +0000 Subject: [PATCH] Update GetNextSpillIndex to support x32 port. R=verwaest@chromium.org Review URL: https://codereview.chromium.org/324253004 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21954 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/x64/lithium-x64.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/x64/lithium-x64.cc b/src/x64/lithium-x64.cc index 919df87..6d772c0 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_++; } -- 2.7.4