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 } |
171 | 179 |
172 void InstructionSelector::VisitLoad(Node* node) { | 180 void InstructionSelector::VisitLoad(Node* node) { |
173 LoadRepresentation load_rep = LoadRepresentationOf(node->op()); | 181 LoadRepresentation load_rep = LoadRepresentationOf(node->op()); |
174 | 182 |
175 ArchOpcode opcode = kArchNop; | 183 ArchOpcode opcode = kArchNop; |
176 switch (load_rep.representation()) { | 184 switch (load_rep.representation()) { |
177 case MachineRepresentation::kFloat32: | 185 case MachineRepresentation::kFloat32: |
178 opcode = kX87Movss; | 186 opcode = kX87Movss; |
179 break; | 187 break; |
180 case MachineRepresentation::kFloat64: | 188 case MachineRepresentation::kFloat64: |
(...skipping 1683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1864 // static | 1872 // static |
1865 MachineOperatorBuilder::AlignmentRequirements | 1873 MachineOperatorBuilder::AlignmentRequirements |
1866 InstructionSelector::AlignmentRequirements() { | 1874 InstructionSelector::AlignmentRequirements() { |
1867 return MachineOperatorBuilder::AlignmentRequirements:: | 1875 return MachineOperatorBuilder::AlignmentRequirements:: |
1868 FullUnalignedAccessSupport(); | 1876 FullUnalignedAccessSupport(); |
1869 } | 1877 } |
1870 | 1878 |
1871 } // namespace compiler | 1879 } // namespace compiler |
1872 } // namespace internal | 1880 } // namespace internal |
1873 } // namespace v8 | 1881 } // namespace v8 |
OLD | NEW |