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/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-inl.h" | 9 #include "src/compiler/node-properties-inl.h" |
10 #include "src/compiler/pipeline.h" | 10 #include "src/compiler/pipeline.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 } | 84 } |
85 | 85 |
86 | 86 |
87 Instruction* InstructionSelector::Emit(InstructionCode opcode, | 87 Instruction* InstructionSelector::Emit(InstructionCode opcode, |
88 InstructionOperand* output, | 88 InstructionOperand* output, |
89 InstructionOperand* a, | 89 InstructionOperand* a, |
90 InstructionOperand* b, size_t temp_count, | 90 InstructionOperand* b, size_t temp_count, |
91 InstructionOperand** temps) { | 91 InstructionOperand** temps) { |
92 size_t output_count = output == NULL ? 0 : 1; | 92 size_t output_count = output == NULL ? 0 : 1; |
93 InstructionOperand* inputs[] = {a, b}; | 93 InstructionOperand* inputs[] = {a, b}; |
94 size_t input_count = ARRAY_SIZE(inputs); | 94 size_t input_count = arraysize(inputs); |
95 return Emit(opcode, output_count, &output, input_count, inputs, temp_count, | 95 return Emit(opcode, output_count, &output, input_count, inputs, temp_count, |
96 temps); | 96 temps); |
97 } | 97 } |
98 | 98 |
99 | 99 |
100 Instruction* InstructionSelector::Emit(InstructionCode opcode, | 100 Instruction* InstructionSelector::Emit(InstructionCode opcode, |
101 InstructionOperand* output, | 101 InstructionOperand* output, |
102 InstructionOperand* a, | 102 InstructionOperand* a, |
103 InstructionOperand* b, | 103 InstructionOperand* b, |
104 InstructionOperand* c, size_t temp_count, | 104 InstructionOperand* c, size_t temp_count, |
105 InstructionOperand** temps) { | 105 InstructionOperand** temps) { |
106 size_t output_count = output == NULL ? 0 : 1; | 106 size_t output_count = output == NULL ? 0 : 1; |
107 InstructionOperand* inputs[] = {a, b, c}; | 107 InstructionOperand* inputs[] = {a, b, c}; |
108 size_t input_count = ARRAY_SIZE(inputs); | 108 size_t input_count = arraysize(inputs); |
109 return Emit(opcode, output_count, &output, input_count, inputs, temp_count, | 109 return Emit(opcode, output_count, &output, input_count, inputs, temp_count, |
110 temps); | 110 temps); |
111 } | 111 } |
112 | 112 |
113 | 113 |
114 Instruction* InstructionSelector::Emit( | 114 Instruction* InstructionSelector::Emit( |
115 InstructionCode opcode, InstructionOperand* output, InstructionOperand* a, | 115 InstructionCode opcode, InstructionOperand* output, InstructionOperand* a, |
116 InstructionOperand* b, InstructionOperand* c, InstructionOperand* d, | 116 InstructionOperand* b, InstructionOperand* c, InstructionOperand* d, |
117 size_t temp_count, InstructionOperand** temps) { | 117 size_t temp_count, InstructionOperand** temps) { |
118 size_t output_count = output == NULL ? 0 : 1; | 118 size_t output_count = output == NULL ? 0 : 1; |
119 InstructionOperand* inputs[] = {a, b, c, d}; | 119 InstructionOperand* inputs[] = {a, b, c, d}; |
120 size_t input_count = ARRAY_SIZE(inputs); | 120 size_t input_count = arraysize(inputs); |
121 return Emit(opcode, output_count, &output, input_count, inputs, temp_count, | 121 return Emit(opcode, output_count, &output, input_count, inputs, temp_count, |
122 temps); | 122 temps); |
123 } | 123 } |
124 | 124 |
125 | 125 |
126 Instruction* InstructionSelector::Emit( | 126 Instruction* InstructionSelector::Emit( |
127 InstructionCode opcode, size_t output_count, InstructionOperand** outputs, | 127 InstructionCode opcode, size_t output_count, InstructionOperand** outputs, |
128 size_t input_count, InstructionOperand** inputs, size_t temp_count, | 128 size_t input_count, InstructionOperand** inputs, size_t temp_count, |
129 InstructionOperand** temps) { | 129 InstructionOperand** temps) { |
130 Instruction* instr = | 130 Instruction* instr = |
(...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1135 | 1135 |
1136 | 1136 |
1137 void InstructionSelector::VisitCall(Node* call, BasicBlock* continuation, | 1137 void InstructionSelector::VisitCall(Node* call, BasicBlock* continuation, |
1138 BasicBlock* deoptimization) {} | 1138 BasicBlock* deoptimization) {} |
1139 | 1139 |
1140 #endif // !V8_TURBOFAN_BACKEND | 1140 #endif // !V8_TURBOFAN_BACKEND |
1141 | 1141 |
1142 } // namespace compiler | 1142 } // namespace compiler |
1143 } // namespace internal | 1143 } // namespace internal |
1144 } // namespace v8 | 1144 } // namespace v8 |
OLD | NEW |