Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(378)

Unified Diff: test/unittests/compiler/instruction-sequence-unittest.h

Issue 800493002: [turbofan] improve register allocator testing framework (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/flag-definitions.h ('k') | test/unittests/compiler/instruction-sequence-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/compiler/instruction-sequence-unittest.h
diff --git a/test/unittests/compiler/instruction-sequence-unittest.h b/test/unittests/compiler/instruction-sequence-unittest.h
index 52589513ae8b5e3535d1ab24e7261fc8dbcb62ae..ce0a5b460db8ec7d0cfd1ff086cf27592ac9aeca 100644
--- a/test/unittests/compiler/instruction-sequence-unittest.h
+++ b/test/unittests/compiler/instruction-sequence-unittest.h
@@ -36,7 +36,9 @@ class InstructionSequenceTest : public TestWithZone {
kFixedSlot,
kImmediate,
kNone,
- kConstant
+ kConstant,
+ kUnique,
+ kUniqueRegister
};
struct TestOperand {
@@ -78,6 +80,12 @@ class InstructionSequenceTest : public TestWithZone {
static TestOperand Use() { return Use(VReg()); }
+ static TestOperand Unique(VReg vreg) { return TestOperand(kUnique, vreg); }
+
+ static TestOperand UniqueReg(VReg vreg) {
+ return TestOperand(kUniqueRegister, vreg);
+ }
+
enum BlockCompletionType { kBlockEnd, kFallThrough, kBranch, kJump };
struct BlockCompletion {
@@ -134,10 +142,16 @@ class InstructionSequenceTest : public TestWithZone {
VReg DefineConstant(int32_t imm = 0);
int EmitNop();
- int EmitI(TestOperand input_op_0);
- VReg EmitOI(TestOperand output_op, TestOperand input_op_0);
- VReg EmitOII(TestOperand output_op, TestOperand input_op_0,
- TestOperand input_op_1);
+ int EmitI(size_t input_size, TestOperand* inputs);
+ int EmitI(TestOperand input_op_0 = TestOperand(),
+ TestOperand input_op_1 = TestOperand(),
+ TestOperand input_op_2 = TestOperand(),
+ TestOperand input_op_3 = TestOperand());
+ VReg EmitOI(TestOperand output_op, size_t input_size, TestOperand* inputs);
+ VReg EmitOI(TestOperand output_op, TestOperand input_op_0 = TestOperand(),
+ TestOperand input_op_1 = TestOperand(),
+ TestOperand input_op_2 = TestOperand(),
+ TestOperand input_op_3 = TestOperand());
VReg EmitCall(TestOperand output_op, size_t input_size, TestOperand* inputs);
VReg EmitCall(TestOperand output_op, TestOperand input_op_0 = TestOperand(),
TestOperand input_op_1 = TestOperand(),
@@ -181,6 +195,7 @@ class InstructionSequenceTest : public TestWithZone {
InstructionOperand* Unallocated(TestOperand op,
UnallocatedOperand::BasicPolicy policy,
int index);
+ InstructionOperand** ConvertInputs(size_t input_size, TestOperand* inputs);
InstructionOperand* ConvertInputOp(TestOperand op);
InstructionOperand* ConvertOutputOp(VReg vreg, TestOperand op);
InstructionBlock* NewBlock();
« no previous file with comments | « src/flag-definitions.h ('k') | test/unittests/compiler/instruction-sequence-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698