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

Unified Diff: test/unittests/interpreter/bytecodes-unittest.cc

Issue 1633153002: [interpreter] Reduce move operations for wide register support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove RegisterOperandIsMovable from RegisterMover interface Created 4 years, 11 months 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
Index: test/unittests/interpreter/bytecodes-unittest.cc
diff --git a/test/unittests/interpreter/bytecodes-unittest.cc b/test/unittests/interpreter/bytecodes-unittest.cc
index bdcccfe6e183f7968306629ca1032f71afbf9dc8..7537b08db513fb251ed98562eadc008176c5ed04 100644
--- a/test/unittests/interpreter/bytecodes-unittest.cc
+++ b/test/unittests/interpreter/bytecodes-unittest.cc
@@ -43,7 +43,6 @@ TEST(OperandConversion, Registers) {
}
}
-
TEST(OperandConversion, Parameters) {
int parameter_counts[] = {7, 13, 99};
@@ -59,7 +58,6 @@ TEST(OperandConversion, Parameters) {
}
}
-
TEST(OperandConversion, RegistersParametersNoOverlap) {
int register_count = Register::MaxRegisterIndex() + 1;
int parameter_count = Register::MaxParameterIndex() + 1;
@@ -118,6 +116,46 @@ TEST(Bytecodes, RegisterOperandBitmaps) {
CHECK_EQ(Bytecodes::GetRegisterOperandBitmap(Bytecode::kForInNext), 7);
}
+TEST(Bytecodes, RegisterOperands) {
+ CHECK(Bytecodes::IsRegisterOperandType(OperandType::kReg8));
+ CHECK(Bytecodes::IsRegisterInputOperandType(OperandType::kReg8));
+ CHECK(!Bytecodes::IsRegisterOutputOperandType(OperandType::kReg8));
+ CHECK(!Bytecodes::IsRegisterInputOperandType(OperandType::kRegOut8));
+ CHECK(Bytecodes::IsRegisterOutputOperandType(OperandType::kRegOut8));
+
+#define IS_REGISTER_OPERAND_TYPE(Name, _) \
+ CHECK(Bytecodes::IsRegisterOperandType(OperandType::k##Name));
+ REGISTER_OPERAND_TYPE_LIST(IS_REGISTER_OPERAND_TYPE)
+#undef IS_REGISTER_OPERAND_TYPE
+
+#define IS_NOT_REGISTER_OPERAND_TYPE(Name, _) \
+ CHECK(!Bytecodes::IsRegisterOperandType(OperandType::k##Name));
+ NON_REGISTER_OPERAND_TYPE_LIST(IS_NOT_REGISTER_OPERAND_TYPE)
+#undef IS_NOT_REGISTER_OPERAND_TYPE
+
+#define IS_REGISTER_INPUT_OPERAND_TYPE(Name, _) \
+ CHECK(Bytecodes::IsRegisterInputOperandType(OperandType::k##Name));
+ REGISTER_INPUT_OPERAND_TYPE_LIST(IS_REGISTER_INPUT_OPERAND_TYPE)
+#undef IS_REGISTER_INPUT_OPERAND_TYPE
+
+#define IS_NOT_REGISTER_INPUT_OPERAND_TYPE(Name, _) \
+ CHECK(!Bytecodes::IsRegisterInputOperandType(OperandType::k##Name));
+ NON_REGISTER_OPERAND_TYPE_LIST(IS_NOT_REGISTER_INPUT_OPERAND_TYPE);
+ REGISTER_OUTPUT_OPERAND_TYPE_LIST(IS_NOT_REGISTER_INPUT_OPERAND_TYPE)
+#undef IS_NOT_REGISTER_INPUT_OPERAND_TYPE
+
+#define IS_REGISTER_OUTPUT_OPERAND_TYPE(Name, _) \
+ CHECK(Bytecodes::IsRegisterOutputOperandType(OperandType::k##Name));
+ REGISTER_OUTPUT_OPERAND_TYPE_LIST(IS_REGISTER_OUTPUT_OPERAND_TYPE)
+#undef IS_REGISTER_OUTPUT_OPERAND_TYPE
+
+#define IS_NOT_REGISTER_OUTPUT_OPERAND_TYPE(Name, _) \
+ CHECK(!Bytecodes::IsRegisterOutputOperandType(OperandType::k##Name));
+ NON_REGISTER_OPERAND_TYPE_LIST(IS_NOT_REGISTER_OUTPUT_OPERAND_TYPE)
+ REGISTER_INPUT_OPERAND_TYPE_LIST(IS_NOT_REGISTER_OUTPUT_OPERAND_TYPE)
+#undef IS_NOT_REGISTER_INPUT_OPERAND_TYPE
+}
+
} // namespace interpreter
} // namespace internal
} // namespace v8
« no previous file with comments | « test/unittests/compiler/interpreter-assembler-unittest.cc ('k') | test/unittests/interpreter/register-translator-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698