Index: src/ia32/lithium-ia32.cc |
diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc |
index e69b66c1ba2d69336bdecd7ddf1021113f3a5772..c729b19ef7c22b4e83e08740cdbc8113aa7990c9 100644 |
--- a/src/ia32/lithium-ia32.cc |
+++ b/src/ia32/lithium-ia32.cc |
@@ -368,7 +368,11 @@ void LAccessArgumentsAt::PrintDataTo(StringStream* stream) { |
int LChunk::GetNextSpillIndex(bool is_double) { |
// Skip a slot if for a double-width slot. |
- if (is_double) spill_slot_count_++; |
+ if (is_double) { |
+ spill_slot_count_++; |
+ spill_slot_count_ |= 1; |
+ num_double_slots_++; |
+ } |
return spill_slot_count_++; |
} |
@@ -550,6 +554,12 @@ LChunk* LChunkBuilder::Build() { |
chunk_ = new(zone()) LChunk(info(), graph()); |
HPhase phase("L_Building chunk", chunk_); |
status_ = BUILDING; |
+ |
+ // Reserve the first spill slot for the state of dynamic alignment. |
+ int alignment_state_index = chunk_->GetNextSpillIndex(false); |
+ ASSERT_EQ(alignment_state_index, 0); |
+ USE(alignment_state_index); |
+ |
const ZoneList<HBasicBlock*>* blocks = graph()->blocks(); |
for (int i = 0; i < blocks->length(); i++) { |
HBasicBlock* next = NULL; |