Index: src/compiler/frame.h |
diff --git a/src/compiler/frame.h b/src/compiler/frame.h |
index a4d6829cfa843d8c06254cce61f6b5f0194a0fbc..8a6c18951a5b87ed5fc0794d146341e34e0bc72c 100644 |
--- a/src/compiler/frame.h |
+++ b/src/compiler/frame.h |
@@ -111,9 +111,18 @@ class Frame : public ZoneObject { |
frame_slot_count_ += count; |
} |
- int AllocateSpillSlot(int width) { |
+ int AllocateSpillSlot(int width, int alignment = 0) { |
int frame_slot_count_before = frame_slot_count_; |
- AllocateAlignedFrameSlots(width); |
+ if (alignment <= kPointerSize) { |
+ AllocateAlignedFrameSlots(width); |
+ } else { |
+ // We need to allocate more place for spill slot |
+ // in case we need an aligned spill slot to be |
+ // able to properly align start of spill slot |
+ // and still have enough place to hold all the |
+ // data |
+ AllocateAlignedFrameSlots(width + alignment - kPointerSize); |
+ } |
spill_slot_count_ += frame_slot_count_ - frame_slot_count_before; |
return frame_slot_count_ - 1; |
} |