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 "src/base/adapters.h" | 5 #include "src/base/adapters.h" |
6 #include "src/base/bits.h" | 6 #include "src/base/bits.h" |
7 #include "src/compiler/instruction-selector-impl.h" | 7 #include "src/compiler/instruction-selector-impl.h" |
8 #include "src/compiler/node-matchers.h" | 8 #include "src/compiler/node-matchers.h" |
9 #include "src/compiler/node-properties.h" | 9 #include "src/compiler/node-properties.h" |
10 | 10 |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 input_count = 4; | 412 input_count = 4; |
413 } else { | 413 } else { |
414 inputs[input_count++] = g.UseRegister(index); | 414 inputs[input_count++] = g.UseRegister(index); |
415 opcode |= AddressingModeField::encode(kMode_Offset_RR); | 415 opcode |= AddressingModeField::encode(kMode_Offset_RR); |
416 } | 416 } |
417 selector->Emit(opcode, 0, nullptr, input_count, inputs); | 417 selector->Emit(opcode, 0, nullptr, input_count, inputs); |
418 } | 418 } |
419 | 419 |
420 } // namespace | 420 } // namespace |
421 | 421 |
| 422 void InstructionSelector::VisitStackSlot(Node* node) { |
| 423 StackSlotRepresentation rep = StackSlotRepresentationOf(node->op()); |
| 424 int slot = frame_->AllocateSpillSlot(rep.size()); |
| 425 OperandGenerator g(this); |
| 426 |
| 427 Emit(kArchStackSlot, g.DefineAsRegister(node), |
| 428 sequence()->AddImmediate(Constant(slot)), 0, nullptr); |
| 429 } |
422 | 430 |
423 void InstructionSelector::VisitLoad(Node* node) { | 431 void InstructionSelector::VisitLoad(Node* node) { |
424 LoadRepresentation load_rep = LoadRepresentationOf(node->op()); | 432 LoadRepresentation load_rep = LoadRepresentationOf(node->op()); |
425 ArmOperandGenerator g(this); | 433 ArmOperandGenerator g(this); |
426 Node* base = node->InputAt(0); | 434 Node* base = node->InputAt(0); |
427 Node* index = node->InputAt(1); | 435 Node* index = node->InputAt(1); |
428 | 436 |
429 InstructionCode opcode = kArchNop; | 437 InstructionCode opcode = kArchNop; |
430 switch (load_rep.representation()) { | 438 switch (load_rep.representation()) { |
431 case MachineRepresentation::kFloat32: | 439 case MachineRepresentation::kFloat32: |
(...skipping 2388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2820 Vector<MachineType> req_aligned = Vector<MachineType>::New(2); | 2828 Vector<MachineType> req_aligned = Vector<MachineType>::New(2); |
2821 req_aligned[0] = MachineType::Float32(); | 2829 req_aligned[0] = MachineType::Float32(); |
2822 req_aligned[1] = MachineType::Float64(); | 2830 req_aligned[1] = MachineType::Float64(); |
2823 return MachineOperatorBuilder::AlignmentRequirements:: | 2831 return MachineOperatorBuilder::AlignmentRequirements:: |
2824 SomeUnalignedAccessUnsupported(req_aligned, req_aligned); | 2832 SomeUnalignedAccessUnsupported(req_aligned, req_aligned); |
2825 } | 2833 } |
2826 | 2834 |
2827 } // namespace compiler | 2835 } // namespace compiler |
2828 } // namespace internal | 2836 } // namespace internal |
2829 } // namespace v8 | 2837 } // namespace v8 |
OLD | NEW |