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 #ifndef V8_UNITTESTS_COMPILER_INSTRUCTION_SEQUENCE_UNITTEST_H_ | 5 #ifndef V8_UNITTESTS_COMPILER_INSTRUCTION_SEQUENCE_UNITTEST_H_ |
6 #define V8_UNITTESTS_COMPILER_INSTRUCTION_SEQUENCE_UNITTEST_H_ | 6 #define V8_UNITTESTS_COMPILER_INSTRUCTION_SEQUENCE_UNITTEST_H_ |
7 | 7 |
8 #include "src/compiler/instruction.h" | 8 #include "src/compiler/instruction.h" |
9 #include "test/unittests/test-utils.h" | 9 #include "test/unittests/test-utils.h" |
10 #include "testing/gmock/include/gmock/gmock.h" | 10 #include "testing/gmock/include/gmock/gmock.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 VReg Define(TestOperand output_op); | 131 VReg Define(TestOperand output_op); |
132 VReg Parameter(TestOperand output_op = Reg()) { return Define(output_op); } | 132 VReg Parameter(TestOperand output_op = Reg()) { return Define(output_op); } |
133 | 133 |
134 int Return(TestOperand input_op_0); | 134 int Return(TestOperand input_op_0); |
135 int Return(VReg vreg) { return Return(Reg(vreg, 0)); } | 135 int Return(VReg vreg) { return Return(Reg(vreg, 0)); } |
136 | 136 |
137 PhiInstruction* Phi(VReg incoming_vreg_0 = VReg(), | 137 PhiInstruction* Phi(VReg incoming_vreg_0 = VReg(), |
138 VReg incoming_vreg_1 = VReg(), | 138 VReg incoming_vreg_1 = VReg(), |
139 VReg incoming_vreg_2 = VReg(), | 139 VReg incoming_vreg_2 = VReg(), |
140 VReg incoming_vreg_3 = VReg()); | 140 VReg incoming_vreg_3 = VReg()); |
141 void Extend(PhiInstruction* phi, VReg vreg); | 141 PhiInstruction* Phi(VReg incoming_vreg_0, size_t input_count); |
| 142 void SetInput(PhiInstruction* phi, size_t input, VReg vreg); |
142 | 143 |
143 VReg DefineConstant(int32_t imm = 0); | 144 VReg DefineConstant(int32_t imm = 0); |
144 int EmitNop(); | 145 int EmitNop(); |
145 int EmitI(size_t input_size, TestOperand* inputs); | 146 int EmitI(size_t input_size, TestOperand* inputs); |
146 int EmitI(TestOperand input_op_0 = TestOperand(), | 147 int EmitI(TestOperand input_op_0 = TestOperand(), |
147 TestOperand input_op_1 = TestOperand(), | 148 TestOperand input_op_1 = TestOperand(), |
148 TestOperand input_op_2 = TestOperand(), | 149 TestOperand input_op_2 = TestOperand(), |
149 TestOperand input_op_3 = TestOperand()); | 150 TestOperand input_op_3 = TestOperand()); |
150 VReg EmitOI(TestOperand output_op, size_t input_size, TestOperand* inputs); | 151 VReg EmitOI(TestOperand output_op, size_t input_size, TestOperand* inputs); |
151 VReg EmitOI(TestOperand output_op, TestOperand input_op_0 = TestOperand(), | 152 VReg EmitOI(TestOperand output_op, TestOperand input_op_0 = TestOperand(), |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 LoopBlocks loop_blocks_; | 231 LoopBlocks loop_blocks_; |
231 InstructionBlock* current_block_; | 232 InstructionBlock* current_block_; |
232 bool block_returns_; | 233 bool block_returns_; |
233 }; | 234 }; |
234 | 235 |
235 } // namespace compiler | 236 } // namespace compiler |
236 } // namespace internal | 237 } // namespace internal |
237 } // namespace v8 | 238 } // namespace v8 |
238 | 239 |
239 #endif // V8_UNITTESTS_COMPILER_INSTRUCTION_SEQUENCE_UNITTEST_H_ | 240 #endif // V8_UNITTESTS_COMPILER_INSTRUCTION_SEQUENCE_UNITTEST_H_ |
OLD | NEW |