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 <limits> | 7 #include <limits> |
8 | 8 |
9 #include "src/compiler/instruction-selector-impl.h" | 9 #include "src/compiler/instruction-selector-impl.h" |
10 #include "src/compiler/node-matchers.h" | 10 #include "src/compiler/node-matchers.h" |
(...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
954 // We must emit a NOP here because every live range needs a defining | 954 // We must emit a NOP here because every live range needs a defining |
955 // instruction in the register allocator. | 955 // instruction in the register allocator. |
956 OperandGenerator g(this); | 956 OperandGenerator g(this); |
957 Emit(kArchNop, g.DefineAsConstant(node)); | 957 Emit(kArchNop, g.DefineAsConstant(node)); |
958 } | 958 } |
959 | 959 |
960 | 960 |
961 void InstructionSelector::VisitGoto(BasicBlock* target) { | 961 void InstructionSelector::VisitGoto(BasicBlock* target) { |
962 // jump to the next block. | 962 // jump to the next block. |
963 OperandGenerator g(this); | 963 OperandGenerator g(this); |
964 Emit(kArchJmp, g.NoOutput(), g.Label(target))->MarkAsControl(); | 964 Emit(kArchJmp, g.NoOutput(), g.Label(target)); |
965 } | 965 } |
966 | 966 |
967 | 967 |
968 void InstructionSelector::VisitReturn(Node* value) { | 968 void InstructionSelector::VisitReturn(Node* value) { |
969 OperandGenerator g(this); | 969 OperandGenerator g(this); |
970 if (value != NULL) { | 970 if (value != NULL) { |
971 Emit(kArchRet, g.NoOutput(), | 971 Emit(kArchRet, g.NoOutput(), |
972 g.UseLocation(value, linkage()->GetReturnLocation(), | 972 g.UseLocation(value, linkage()->GetReturnLocation(), |
973 linkage()->GetReturnType())); | 973 linkage()->GetReturnType())); |
974 } else { | 974 } else { |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1124 MachineOperatorBuilder::Flags | 1124 MachineOperatorBuilder::Flags |
1125 InstructionSelector::SupportedMachineOperatorFlags() { | 1125 InstructionSelector::SupportedMachineOperatorFlags() { |
1126 return MachineOperatorBuilder::Flag::kNoFlags; | 1126 return MachineOperatorBuilder::Flag::kNoFlags; |
1127 } | 1127 } |
1128 | 1128 |
1129 #endif // !V8_TURBOFAN_BACKEND | 1129 #endif // !V8_TURBOFAN_BACKEND |
1130 | 1130 |
1131 } // namespace compiler | 1131 } // namespace compiler |
1132 } // namespace internal | 1132 } // namespace internal |
1133 } // namespace v8 | 1133 } // namespace v8 |
OLD | NEW |