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/assembler-inl.h" | 5 #include "src/assembler-inl.h" |
6 #include "src/compiler/instruction-selector-impl.h" | 6 #include "src/compiler/instruction-selector-impl.h" |
7 #include "src/compiler/node-matchers.h" | 7 #include "src/compiler/node-matchers.h" |
8 #include "src/compiler/node-properties.h" | 8 #include "src/compiler/node-properties.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 uint64_t value_minus_one = m->right().Value() - 1; | 520 uint64_t value_minus_one = m->right().Value() - 1; |
521 if (base::bits::IsPowerOfTwo64(value_minus_one)) { | 521 if (base::bits::IsPowerOfTwo64(value_minus_one)) { |
522 return WhichPowerOf2_64(value_minus_one); | 522 return WhichPowerOf2_64(value_minus_one); |
523 } | 523 } |
524 } | 524 } |
525 return 0; | 525 return 0; |
526 } | 526 } |
527 | 527 |
528 } // namespace | 528 } // namespace |
529 | 529 |
530 void InstructionSelector::VisitStackSlot(Node* node) { | |
531 StackSlotRepresentation rep = StackSlotRepresentationOf(node->op()); | |
532 int slot = frame_->AllocateSpillSlot(rep.size()); | |
533 OperandGenerator g(this); | |
534 | |
535 Emit(kArchStackSlot, g.DefineAsRegister(node), | |
536 sequence()->AddImmediate(Constant(slot)), 0, nullptr); | |
537 } | |
538 | |
539 void EmitLoad(InstructionSelector* selector, Node* node, InstructionCode opcode, | 530 void EmitLoad(InstructionSelector* selector, Node* node, InstructionCode opcode, |
540 ImmediateMode immediate_mode, MachineRepresentation rep, | 531 ImmediateMode immediate_mode, MachineRepresentation rep, |
541 Node* output = nullptr) { | 532 Node* output = nullptr) { |
542 Arm64OperandGenerator g(selector); | 533 Arm64OperandGenerator g(selector); |
543 Node* base = node->InputAt(0); | 534 Node* base = node->InputAt(0); |
544 Node* index = node->InputAt(1); | 535 Node* index = node->InputAt(1); |
545 InstructionOperand inputs[3]; | 536 InstructionOperand inputs[3]; |
546 size_t input_count = 0; | 537 size_t input_count = 0; |
547 InstructionOperand outputs[1]; | 538 InstructionOperand outputs[1]; |
548 | 539 |
(...skipping 2326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2875 // static | 2866 // static |
2876 MachineOperatorBuilder::AlignmentRequirements | 2867 MachineOperatorBuilder::AlignmentRequirements |
2877 InstructionSelector::AlignmentRequirements() { | 2868 InstructionSelector::AlignmentRequirements() { |
2878 return MachineOperatorBuilder::AlignmentRequirements:: | 2869 return MachineOperatorBuilder::AlignmentRequirements:: |
2879 FullUnalignedAccessSupport(); | 2870 FullUnalignedAccessSupport(); |
2880 } | 2871 } |
2881 | 2872 |
2882 } // namespace compiler | 2873 } // namespace compiler |
2883 } // namespace internal | 2874 } // namespace internal |
2884 } // namespace v8 | 2875 } // namespace v8 |
OLD | NEW |