| OLD | NEW |
| 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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 case MachineRepresentation::kNone: | 272 case MachineRepresentation::kNone: |
| 273 UNREACHABLE(); | 273 UNREACHABLE(); |
| 274 return kArchNop; | 274 return kArchNop; |
| 275 } | 275 } |
| 276 UNREACHABLE(); | 276 UNREACHABLE(); |
| 277 return kArchNop; | 277 return kArchNop; |
| 278 } | 278 } |
| 279 | 279 |
| 280 } // namespace | 280 } // namespace |
| 281 | 281 |
| 282 void InstructionSelector::VisitStackSlot(Node* node) { |
| 283 StackSlotRepresentation rep = StackSlotRepresentationOf(node->op()); |
| 284 int slot = frame_->AllocateSpillSlot(rep.size()); |
| 285 OperandGenerator g(this); |
| 286 |
| 287 Emit(kArchStackSlot, g.DefineAsRegister(node), |
| 288 sequence()->AddImmediate(Constant(slot)), 0, nullptr); |
| 289 } |
| 290 |
| 282 void InstructionSelector::VisitLoad(Node* node) { | 291 void InstructionSelector::VisitLoad(Node* node) { |
| 283 LoadRepresentation load_rep = LoadRepresentationOf(node->op()); | 292 LoadRepresentation load_rep = LoadRepresentationOf(node->op()); |
| 284 X64OperandGenerator g(this); | 293 X64OperandGenerator g(this); |
| 285 | 294 |
| 286 ArchOpcode opcode = GetLoadOpcode(load_rep); | 295 ArchOpcode opcode = GetLoadOpcode(load_rep); |
| 287 InstructionOperand outputs[1]; | 296 InstructionOperand outputs[1]; |
| 288 outputs[0] = g.DefineAsRegister(node); | 297 outputs[0] = g.DefineAsRegister(node); |
| 289 InstructionOperand inputs[4]; | 298 InstructionOperand inputs[4]; |
| 290 size_t input_count = 0; | 299 size_t input_count = 0; |
| 291 AddressingMode mode = | 300 AddressingMode mode = |
| (...skipping 2308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2600 // static | 2609 // static |
| 2601 MachineOperatorBuilder::AlignmentRequirements | 2610 MachineOperatorBuilder::AlignmentRequirements |
| 2602 InstructionSelector::AlignmentRequirements() { | 2611 InstructionSelector::AlignmentRequirements() { |
| 2603 return MachineOperatorBuilder::AlignmentRequirements:: | 2612 return MachineOperatorBuilder::AlignmentRequirements:: |
| 2604 FullUnalignedAccessSupport(); | 2613 FullUnalignedAccessSupport(); |
| 2605 } | 2614 } |
| 2606 | 2615 |
| 2607 } // namespace compiler | 2616 } // namespace compiler |
| 2608 } // namespace internal | 2617 } // namespace internal |
| 2609 } // namespace v8 | 2618 } // namespace v8 |
| OLD | NEW |