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/compiler/instruction-selector.h" | 5 #include "src/compiler/instruction-selector.h" |
6 | 6 |
7 #include "src/compiler/graph.h" | 7 #include "src/compiler/graph.h" |
8 #include "src/compiler/instruction-selector-impl.h" | 8 #include "src/compiler/instruction-selector-impl.h" |
9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
10 #include "src/compiler/node-properties-inl.h" | 10 #include "src/compiler/node-properties-inl.h" |
(...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
995 // We must emit a NOP here because every live range needs a defining | 995 // We must emit a NOP here because every live range needs a defining |
996 // instruction in the register allocator. | 996 // instruction in the register allocator. |
997 OperandGenerator g(this); | 997 OperandGenerator g(this); |
998 Emit(kArchNop, g.DefineAsConstant(node)); | 998 Emit(kArchNop, g.DefineAsConstant(node)); |
999 } | 999 } |
1000 | 1000 |
1001 | 1001 |
1002 void InstructionSelector::VisitGoto(BasicBlock* target) { | 1002 void InstructionSelector::VisitGoto(BasicBlock* target) { |
1003 // jump to the next block. | 1003 // jump to the next block. |
1004 OperandGenerator g(this); | 1004 OperandGenerator g(this); |
1005 Emit(kArchJmp, NULL, g.Label(target))->MarkAsControl(); | 1005 Emit(kArchJmp, NULL, g.Label(target)); |
1006 } | 1006 } |
1007 | 1007 |
1008 | 1008 |
1009 void InstructionSelector::VisitReturn(Node* value) { | 1009 void InstructionSelector::VisitReturn(Node* value) { |
1010 OperandGenerator g(this); | 1010 OperandGenerator g(this); |
1011 if (value != NULL) { | 1011 if (value != NULL) { |
1012 Emit(kArchRet, NULL, g.UseLocation(value, linkage()->GetReturnLocation(), | 1012 Emit(kArchRet, NULL, g.UseLocation(value, linkage()->GetReturnLocation(), |
1013 linkage()->GetReturnType())); | 1013 linkage()->GetReturnType())); |
1014 } else { | 1014 } else { |
1015 Emit(kArchRet, NULL); | 1015 Emit(kArchRet, NULL); |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1142 MachineOperatorBuilder::Flags | 1142 MachineOperatorBuilder::Flags |
1143 InstructionSelector::SupportedMachineOperatorFlags() { | 1143 InstructionSelector::SupportedMachineOperatorFlags() { |
1144 return MachineOperatorBuilder::Flag::kNoFlags; | 1144 return MachineOperatorBuilder::Flag::kNoFlags; |
1145 } | 1145 } |
1146 | 1146 |
1147 #endif // !V8_TURBOFAN_BACKEND | 1147 #endif // !V8_TURBOFAN_BACKEND |
1148 | 1148 |
1149 } // namespace compiler | 1149 } // namespace compiler |
1150 } // namespace internal | 1150 } // namespace internal |
1151 } // namespace v8 | 1151 } // namespace v8 |
OLD | NEW |