| 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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 static void VisitBinop(InstructionSelector* selector, Node* node, | 249 static void VisitBinop(InstructionSelector* selector, Node* node, |
| 250 InstructionCode opcode, FlagsContinuation* cont) { | 250 InstructionCode opcode, FlagsContinuation* cont) { |
| 251 VisitBinop(selector, node, opcode, false, kArchNop, cont); | 251 VisitBinop(selector, node, opcode, false, kArchNop, cont); |
| 252 } | 252 } |
| 253 | 253 |
| 254 static void VisitBinop(InstructionSelector* selector, Node* node, | 254 static void VisitBinop(InstructionSelector* selector, Node* node, |
| 255 InstructionCode opcode) { | 255 InstructionCode opcode) { |
| 256 VisitBinop(selector, node, opcode, false, kArchNop); | 256 VisitBinop(selector, node, opcode, false, kArchNop); |
| 257 } | 257 } |
| 258 | 258 |
| 259 void InstructionSelector::VisitStackSlot(Node* node) { |
| 260 StackSlotRepresentation rep = StackSlotRepresentationOf(node->op()); |
| 261 int alignment = rep.alignment(); |
| 262 int slot = frame_->AllocateSpillSlot(rep.size(), alignment); |
| 263 OperandGenerator g(this); |
| 264 |
| 265 Emit(kArchStackSlot, g.DefineAsRegister(node), |
| 266 sequence()->AddImmediate(Constant(slot)), |
| 267 sequence()->AddImmediate(Constant(alignment)), 0, nullptr); |
| 268 } |
| 259 | 269 |
| 260 void InstructionSelector::VisitLoad(Node* node) { | 270 void InstructionSelector::VisitLoad(Node* node) { |
| 261 LoadRepresentation load_rep = LoadRepresentationOf(node->op()); | 271 LoadRepresentation load_rep = LoadRepresentationOf(node->op()); |
| 262 MipsOperandGenerator g(this); | 272 MipsOperandGenerator g(this); |
| 263 Node* base = node->InputAt(0); | 273 Node* base = node->InputAt(0); |
| 264 Node* index = node->InputAt(1); | 274 Node* index = node->InputAt(1); |
| 265 | 275 |
| 266 ArchOpcode opcode = kArchNop; | 276 ArchOpcode opcode = kArchNop; |
| 267 switch (load_rep.representation()) { | 277 switch (load_rep.representation()) { |
| 268 case MachineRepresentation::kFloat32: | 278 case MachineRepresentation::kFloat32: |
| (...skipping 1925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2194 DCHECK(IsMipsArchVariant(kLoongson) || IsMipsArchVariant(kMips32r1) || | 2204 DCHECK(IsMipsArchVariant(kLoongson) || IsMipsArchVariant(kMips32r1) || |
| 2195 IsMipsArchVariant(kMips32r2)); | 2205 IsMipsArchVariant(kMips32r2)); |
| 2196 return MachineOperatorBuilder::AlignmentRequirements:: | 2206 return MachineOperatorBuilder::AlignmentRequirements:: |
| 2197 NoUnalignedAccessSupport(); | 2207 NoUnalignedAccessSupport(); |
| 2198 } | 2208 } |
| 2199 } | 2209 } |
| 2200 | 2210 |
| 2201 } // namespace compiler | 2211 } // namespace compiler |
| 2202 } // namespace internal | 2212 } // namespace internal |
| 2203 } // namespace v8 | 2213 } // namespace v8 |
| OLD | NEW |