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 } | |
430 | 422 |
431 void InstructionSelector::VisitLoad(Node* node) { | 423 void InstructionSelector::VisitLoad(Node* node) { |
432 LoadRepresentation load_rep = LoadRepresentationOf(node->op()); | 424 LoadRepresentation load_rep = LoadRepresentationOf(node->op()); |
433 ArmOperandGenerator g(this); | 425 ArmOperandGenerator g(this); |
434 Node* base = node->InputAt(0); | 426 Node* base = node->InputAt(0); |
435 Node* index = node->InputAt(1); | 427 Node* index = node->InputAt(1); |
436 | 428 |
437 InstructionCode opcode = kArchNop; | 429 InstructionCode opcode = kArchNop; |
438 switch (load_rep.representation()) { | 430 switch (load_rep.representation()) { |
439 case MachineRepresentation::kFloat32: | 431 case MachineRepresentation::kFloat32: |
(...skipping 2352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2792 Vector<MachineType> req_aligned = Vector<MachineType>::New(2); | 2784 Vector<MachineType> req_aligned = Vector<MachineType>::New(2); |
2793 req_aligned[0] = MachineType::Float32(); | 2785 req_aligned[0] = MachineType::Float32(); |
2794 req_aligned[1] = MachineType::Float64(); | 2786 req_aligned[1] = MachineType::Float64(); |
2795 return MachineOperatorBuilder::AlignmentRequirements:: | 2787 return MachineOperatorBuilder::AlignmentRequirements:: |
2796 SomeUnalignedAccessUnsupported(req_aligned, req_aligned); | 2788 SomeUnalignedAccessUnsupported(req_aligned, req_aligned); |
2797 } | 2789 } |
2798 | 2790 |
2799 } // namespace compiler | 2791 } // namespace compiler |
2800 } // namespace internal | 2792 } // namespace internal |
2801 } // namespace v8 | 2793 } // namespace v8 |
OLD | NEW |