| Index: test/unittests/compiler/interpreter-assembler-unittest.cc
|
| diff --git a/test/unittests/compiler/interpreter-assembler-unittest.cc b/test/unittests/compiler/interpreter-assembler-unittest.cc
|
| index 1e49b08e80d46b07c67aee6d2d3a861b41beb09f..339b61b5b9832aeb5f0fb27805aefc8f0f6cff56 100644
|
| --- a/test/unittests/compiler/interpreter-assembler-unittest.cc
|
| +++ b/test/unittests/compiler/interpreter-assembler-unittest.cc
|
| @@ -619,6 +619,34 @@ TARGET_TEST_F(InterpreterAssemblerTest, CallRuntime) {
|
| }
|
|
|
|
|
| +TARGET_TEST_F(InterpreterAssemblerTest, CallRuntimePair) {
|
| + TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) {
|
| + InterpreterAssemblerForTest m(this, bytecode);
|
| + Callable builtin = CodeFactory::InterpreterCEntryPair(isolate());
|
| +
|
| + Node* function_id = m.Int32Constant(0);
|
| + Node* first_arg = m.Int32Constant(1);
|
| + Node* arg_count = m.Int32Constant(2);
|
| +
|
| + Matcher<Node*> function_table = IsExternalConstant(
|
| + ExternalReference::runtime_function_table_address(isolate()));
|
| + Matcher<Node*> function = IsIntPtrAdd(
|
| + function_table,
|
| + IsInt32Mul(function_id, IsInt32Constant(sizeof(Runtime::Function))));
|
| + Matcher<Node*> function_entry =
|
| + m.IsLoad(MachineType::Pointer(), function,
|
| + IsInt32Constant(offsetof(Runtime::Function, entry)));
|
| +
|
| + Node* call_runtime = m.CallRuntime(function_id, first_arg, arg_count);
|
| + EXPECT_THAT(
|
| + call_runtime,
|
| + IsCall(_, IsHeapConstant(builtin.code()), arg_count, first_arg,
|
| + function_entry,
|
| + IsParameter(Linkage::kInterpreterContextParameter), _, _));
|
| + }
|
| +}
|
| +
|
| +
|
| TARGET_TEST_F(InterpreterAssemblerTest, CallIC) {
|
| TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) {
|
| InterpreterAssemblerForTest m(this, bytecode);
|
|
|