| 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 #include "src/ppc/frames-ppc.h" | 9 #include "src/ppc/frames-ppc.h" |
| 10 | 10 |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 // Shared routine for multiple binary operations. | 167 // Shared routine for multiple binary operations. |
| 168 template <typename Matcher> | 168 template <typename Matcher> |
| 169 void VisitBinop(InstructionSelector* selector, Node* node, | 169 void VisitBinop(InstructionSelector* selector, Node* node, |
| 170 InstructionCode opcode, ImmediateMode operand_mode) { | 170 InstructionCode opcode, ImmediateMode operand_mode) { |
| 171 FlagsContinuation cont; | 171 FlagsContinuation cont; |
| 172 VisitBinop<Matcher>(selector, node, opcode, operand_mode, &cont); | 172 VisitBinop<Matcher>(selector, node, opcode, operand_mode, &cont); |
| 173 } | 173 } |
| 174 | 174 |
| 175 } // namespace | 175 } // namespace |
| 176 | 176 |
| 177 void InstructionSelector::VisitStackSlot(Node* node) { |
| 178 StackSlotRepresentation rep = StackSlotRepresentationOf(node->op()); |
| 179 int slot = frame_->AllocateSpillSlot(rep.size()); |
| 180 OperandGenerator g(this); |
| 181 |
| 182 Emit(kArchStackSlot, g.DefineAsRegister(node), |
| 183 sequence()->AddImmediate(Constant(slot)), 0, nullptr); |
| 184 } |
| 177 | 185 |
| 178 void InstructionSelector::VisitLoad(Node* node) { | 186 void InstructionSelector::VisitLoad(Node* node) { |
| 179 LoadRepresentation load_rep = LoadRepresentationOf(node->op()); | 187 LoadRepresentation load_rep = LoadRepresentationOf(node->op()); |
| 180 PPCOperandGenerator g(this); | 188 PPCOperandGenerator g(this); |
| 181 Node* base = node->InputAt(0); | 189 Node* base = node->InputAt(0); |
| 182 Node* offset = node->InputAt(1); | 190 Node* offset = node->InputAt(1); |
| 183 ArchOpcode opcode = kArchNop; | 191 ArchOpcode opcode = kArchNop; |
| 184 ImmediateMode mode = kInt16Imm; | 192 ImmediateMode mode = kInt16Imm; |
| 185 switch (load_rep.representation()) { | 193 switch (load_rep.representation()) { |
| 186 case MachineRepresentation::kFloat32: | 194 case MachineRepresentation::kFloat32: |
| (...skipping 2004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2191 // static | 2199 // static |
| 2192 MachineOperatorBuilder::AlignmentRequirements | 2200 MachineOperatorBuilder::AlignmentRequirements |
| 2193 InstructionSelector::AlignmentRequirements() { | 2201 InstructionSelector::AlignmentRequirements() { |
| 2194 return MachineOperatorBuilder::AlignmentRequirements:: | 2202 return MachineOperatorBuilder::AlignmentRequirements:: |
| 2195 FullUnalignedAccessSupport(); | 2203 FullUnalignedAccessSupport(); |
| 2196 } | 2204 } |
| 2197 | 2205 |
| 2198 } // namespace compiler | 2206 } // namespace compiler |
| 2199 } // namespace internal | 2207 } // namespace internal |
| 2200 } // namespace v8 | 2208 } // namespace v8 |
| OLD | NEW |