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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 if (selector->IsSupported(AVX)) { | 205 if (selector->IsSupported(AVX)) { |
206 selector->Emit(avx_opcode, g.DefineAsRegister(node), g.Use(input)); | 206 selector->Emit(avx_opcode, g.DefineAsRegister(node), g.Use(input)); |
207 } else { | 207 } else { |
208 selector->Emit(sse_opcode, g.DefineSameAsFirst(node), g.UseRegister(input)); | 208 selector->Emit(sse_opcode, g.DefineSameAsFirst(node), g.UseRegister(input)); |
209 } | 209 } |
210 } | 210 } |
211 | 211 |
212 | 212 |
213 } // namespace | 213 } // namespace |
214 | 214 |
215 void InstructionSelector::VisitStackSlot(Node* node) { | |
216 StackSlotRepresentation rep = StackSlotRepresentationOf(node->op()); | |
217 int slot = frame_->AllocateSpillSlot(rep.size()); | |
218 OperandGenerator g(this); | |
219 | |
220 Emit(kArchStackSlot, g.DefineAsRegister(node), | |
221 sequence()->AddImmediate(Constant(slot)), 0, nullptr); | |
222 } | |
223 | 215 |
224 void InstructionSelector::VisitLoad(Node* node) { | 216 void InstructionSelector::VisitLoad(Node* node) { |
225 LoadRepresentation load_rep = LoadRepresentationOf(node->op()); | 217 LoadRepresentation load_rep = LoadRepresentationOf(node->op()); |
226 | 218 |
227 ArchOpcode opcode = kArchNop; | 219 ArchOpcode opcode = kArchNop; |
228 switch (load_rep.representation()) { | 220 switch (load_rep.representation()) { |
229 case MachineRepresentation::kFloat32: | 221 case MachineRepresentation::kFloat32: |
230 opcode = kIA32Movss; | 222 opcode = kIA32Movss; |
231 break; | 223 break; |
232 case MachineRepresentation::kFloat64: | 224 case MachineRepresentation::kFloat64: |
(...skipping 1724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1957 // static | 1949 // static |
1958 MachineOperatorBuilder::AlignmentRequirements | 1950 MachineOperatorBuilder::AlignmentRequirements |
1959 InstructionSelector::AlignmentRequirements() { | 1951 InstructionSelector::AlignmentRequirements() { |
1960 return MachineOperatorBuilder::AlignmentRequirements:: | 1952 return MachineOperatorBuilder::AlignmentRequirements:: |
1961 FullUnalignedAccessSupport(); | 1953 FullUnalignedAccessSupport(); |
1962 } | 1954 } |
1963 | 1955 |
1964 } // namespace compiler | 1956 } // namespace compiler |
1965 } // namespace internal | 1957 } // namespace internal |
1966 } // namespace v8 | 1958 } // namespace v8 |
OLD | NEW |