Index: src/compiler/instruction-selector.cc |
diff --git a/src/compiler/instruction-selector.cc b/src/compiler/instruction-selector.cc |
index 14905aa016a1067ca9832fd724ff125f1e4b4101..279ac636c844a5b6ce94f17aceaf87f570a81759 100644 |
--- a/src/compiler/instruction-selector.cc |
+++ b/src/compiler/instruction-selector.cc |
@@ -1888,12 +1888,14 @@ void InstructionSelector::EmitLookupSwitch(const SwitchInfo& sw, |
} |
void InstructionSelector::VisitStackSlot(Node* node) { |
ahaas
2017/04/24 11:43:54
Can you move this code to platform-specific code?
ivica.bogosavljevic
2017/04/27 13:56:56
Acknowledged.
|
- int size = StackSlotSizeOf(node->op()); |
- int slot = frame_->AllocateSpillSlot(size); |
+ StackSlotRepresentation rep = StackSlotRepresentationOf(node->op()); |
+ int alignment = rep.alignment(); |
+ int slot = frame_->AllocateSpillSlot(rep.size(), alignment); |
OperandGenerator g(this); |
Emit(kArchStackSlot, g.DefineAsRegister(node), |
- sequence()->AddImmediate(Constant(slot)), 0, nullptr); |
+ sequence()->AddImmediate(Constant(slot)), |
+ sequence()->AddImmediate(Constant(alignment)), 0, nullptr); |
} |
void InstructionSelector::VisitBitcastTaggedToWord(Node* node) { |