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

Side by Side Diff: src/compiler/x64/instruction-selector-x64.cc

Issue 2874713003: [turbofan] Reland of `Add alignment parameter to StackSlot operator` (Closed)
Patch Set: Fix failures with control flow integrity bots Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <algorithm> 5 #include <algorithm>
6 6
7 #include "src/base/adapters.h" 7 #include "src/base/adapters.h"
8 #include "src/compiler/instruction-selector-impl.h" 8 #include "src/compiler/instruction-selector-impl.h"
9 #include "src/compiler/node-matchers.h" 9 #include "src/compiler/node-matchers.h"
10 #include "src/compiler/node-properties.h" 10 #include "src/compiler/node-properties.h"
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 case MachineRepresentation::kNone: 276 case MachineRepresentation::kNone:
277 UNREACHABLE(); 277 UNREACHABLE();
278 return kArchNop; 278 return kArchNop;
279 } 279 }
280 UNREACHABLE(); 280 UNREACHABLE();
281 return kArchNop; 281 return kArchNop;
282 } 282 }
283 283
284 } // namespace 284 } // namespace
285 285
286 void InstructionSelector::VisitStackSlot(Node* node) {
287 StackSlotRepresentation rep = StackSlotRepresentationOf(node->op());
288 int slot = frame_->AllocateSpillSlot(rep.size());
289 OperandGenerator g(this);
290
291 Emit(kArchStackSlot, g.DefineAsRegister(node),
292 sequence()->AddImmediate(Constant(slot)), 0, nullptr);
293 }
294
286 void InstructionSelector::VisitLoad(Node* node) { 295 void InstructionSelector::VisitLoad(Node* node) {
287 LoadRepresentation load_rep = LoadRepresentationOf(node->op()); 296 LoadRepresentation load_rep = LoadRepresentationOf(node->op());
288 X64OperandGenerator g(this); 297 X64OperandGenerator g(this);
289 298
290 ArchOpcode opcode = GetLoadOpcode(load_rep); 299 ArchOpcode opcode = GetLoadOpcode(load_rep);
291 InstructionOperand outputs[1]; 300 InstructionOperand outputs[1];
292 outputs[0] = g.DefineAsRegister(node); 301 outputs[0] = g.DefineAsRegister(node);
293 InstructionOperand inputs[4]; 302 InstructionOperand inputs[4];
294 size_t input_count = 0; 303 size_t input_count = 0;
295 AddressingMode mode = 304 AddressingMode mode =
(...skipping 2324 matching lines...) Expand 10 before | Expand all | Expand 10 after
2620 // static 2629 // static
2621 MachineOperatorBuilder::AlignmentRequirements 2630 MachineOperatorBuilder::AlignmentRequirements
2622 InstructionSelector::AlignmentRequirements() { 2631 InstructionSelector::AlignmentRequirements() {
2623 return MachineOperatorBuilder::AlignmentRequirements:: 2632 return MachineOperatorBuilder::AlignmentRequirements::
2624 FullUnalignedAccessSupport(); 2633 FullUnalignedAccessSupport();
2625 } 2634 }
2626 2635
2627 } // namespace compiler 2636 } // namespace compiler
2628 } // namespace internal 2637 } // namespace internal
2629 } // namespace v8 2638 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/s390/instruction-selector-s390.cc ('k') | src/compiler/x87/instruction-selector-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698