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_CCTEST_COMPILER_CODEGEN_TESTER_H_ | 5 #ifndef V8_CCTEST_COMPILER_CODEGEN_TESTER_H_ |
6 #define V8_CCTEST_COMPILER_CODEGEN_TESTER_H_ | 6 #define V8_CCTEST_COMPILER_CODEGEN_TESTER_H_ |
7 | 7 |
8 #include "src/compiler/instruction-selector.h" | 8 #include "src/compiler/instruction-selector.h" |
9 #include "src/compiler/pipeline.h" | 9 #include "src/compiler/pipeline.h" |
10 #include "src/compiler/raw-machine-assembler.h" | 10 #include "src/compiler/raw-machine-assembler.h" |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 } | 249 } |
250 | 250 |
251 virtual byte* Generate() { return RawMachineAssemblerTester::Generate(); } | 251 virtual byte* Generate() { return RawMachineAssemblerTester::Generate(); } |
252 | 252 |
253 // The BufferedRawMachineAssemblerTester does not pass parameters directly | 253 // The BufferedRawMachineAssemblerTester does not pass parameters directly |
254 // to the constructed IR graph. Instead it passes a pointer to the parameter | 254 // to the constructed IR graph. Instead it passes a pointer to the parameter |
255 // to the IR graph, and adds Load nodes to the IR graph to load the | 255 // to the IR graph, and adds Load nodes to the IR graph to load the |
256 // parameters from memory. Thereby it is possible to pass 64 bit parameters | 256 // parameters from memory. Thereby it is possible to pass 64 bit parameters |
257 // to the IR graph. | 257 // to the IR graph. |
258 Node* Parameter(size_t index) { | 258 Node* Parameter(size_t index) { |
259 CHECK(index >= 0 && index < 4); | 259 CHECK(index < 4); |
260 return parameter_nodes_[index]; | 260 return parameter_nodes_[index]; |
261 } | 261 } |
262 | 262 |
263 | 263 |
264 void Call() { | 264 void Call() { |
265 CSignature::VerifyParams(test_graph_signature_); | 265 CSignature::VerifyParams(test_graph_signature_); |
266 CallHelper<void>::Call(); | 266 CallHelper<void>::Call(); |
267 } | 267 } |
268 | 268 |
269 template <typename P0> | 269 template <typename P0> |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
538 | 538 |
539 void Run(RawMachineAssemblerTester<int32_t>* m); | 539 void Run(RawMachineAssemblerTester<int32_t>* m); |
540 void RunLeft(RawMachineAssemblerTester<int32_t>* m); | 540 void RunLeft(RawMachineAssemblerTester<int32_t>* m); |
541 void RunRight(RawMachineAssemblerTester<int32_t>* m); | 541 void RunRight(RawMachineAssemblerTester<int32_t>* m); |
542 }; | 542 }; |
543 } // namespace compiler | 543 } // namespace compiler |
544 } // namespace internal | 544 } // namespace internal |
545 } // namespace v8 | 545 } // namespace v8 |
546 | 546 |
547 #endif // V8_CCTEST_COMPILER_CODEGEN_TESTER_H_ | 547 #endif // V8_CCTEST_COMPILER_CODEGEN_TESTER_H_ |
OLD | NEW |