Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Unified Diff: src/compiler/instruction-selector.cc

Issue 2816743003: [turbofan] Add alignment parameter to StackSlot operator (Closed)
Patch Set: Upload missing file Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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) {

Powered by Google App Engine
This is Rietveld 408576698