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/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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 inputs[(*input_count)++] = UseRegister(node->InputAt(1)); | 161 inputs[(*input_count)++] = UseRegister(node->InputAt(1)); |
162 return kMode_MR1; | 162 return kMode_MR1; |
163 } | 163 } |
164 } | 164 } |
165 | 165 |
166 bool CanBeBetterLeftOperand(Node* node) const { | 166 bool CanBeBetterLeftOperand(Node* node) const { |
167 return !selector()->IsLive(node); | 167 return !selector()->IsLive(node); |
168 } | 168 } |
169 }; | 169 }; |
170 | 170 |
171 void InstructionSelector::VisitStackSlot(Node* node) { | |
172 StackSlotRepresentation rep = StackSlotRepresentationOf(node->op()); | |
173 int slot = frame_->AllocateSpillSlot(rep.size()); | |
174 OperandGenerator g(this); | |
175 | |
176 Emit(kArchStackSlot, g.DefineAsRegister(node), | |
177 sequence()->AddImmediate(Constant(slot)), 0, nullptr); | |
178 } | |
179 | 171 |
180 void InstructionSelector::VisitLoad(Node* node) { | 172 void InstructionSelector::VisitLoad(Node* node) { |
181 LoadRepresentation load_rep = LoadRepresentationOf(node->op()); | 173 LoadRepresentation load_rep = LoadRepresentationOf(node->op()); |
182 | 174 |
183 ArchOpcode opcode = kArchNop; | 175 ArchOpcode opcode = kArchNop; |
184 switch (load_rep.representation()) { | 176 switch (load_rep.representation()) { |
185 case MachineRepresentation::kFloat32: | 177 case MachineRepresentation::kFloat32: |
186 opcode = kX87Movss; | 178 opcode = kX87Movss; |
187 break; | 179 break; |
188 case MachineRepresentation::kFloat64: | 180 case MachineRepresentation::kFloat64: |
(...skipping 1683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1872 // static | 1864 // static |
1873 MachineOperatorBuilder::AlignmentRequirements | 1865 MachineOperatorBuilder::AlignmentRequirements |
1874 InstructionSelector::AlignmentRequirements() { | 1866 InstructionSelector::AlignmentRequirements() { |
1875 return MachineOperatorBuilder::AlignmentRequirements:: | 1867 return MachineOperatorBuilder::AlignmentRequirements:: |
1876 FullUnalignedAccessSupport(); | 1868 FullUnalignedAccessSupport(); |
1877 } | 1869 } |
1878 | 1870 |
1879 } // namespace compiler | 1871 } // namespace compiler |
1880 } // namespace internal | 1872 } // namespace internal |
1881 } // namespace v8 | 1873 } // namespace v8 |
OLD | NEW |