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 9fdb7f51e617441698c30e02b0572e86c8e6eb42..b7e15a98ca02498eefe234eff55914e78b2712cd 100644 |
--- a/test/unittests/compiler/interpreter-assembler-unittest.cc |
+++ b/test/unittests/compiler/interpreter-assembler-unittest.cc |
@@ -177,6 +177,9 @@ TARGET_TEST_F(InterpreterAssemblerTest, BytecodeOperand) { |
int number_of_operands = interpreter::Bytecodes::NumberOfOperands(bytecode); |
for (int i = 0; i < number_of_operands; i++) { |
switch (interpreter::Bytecodes::GetOperandType(bytecode, i)) { |
+ case interpreter::OperandType::kIdx: |
+ EXPECT_THAT(m.BytecodeOperandIdx(i), m.IsBytecodeOperand(i)); |
+ break; |
case interpreter::OperandType::kImm8: |
EXPECT_THAT(m.BytecodeOperandImm8(i), |
m.IsBytecodeOperandSignExtended(i)); |
@@ -266,6 +269,25 @@ TARGET_TEST_F(InterpreterAssemblerTest, SmiTag) { |
} |
+TARGET_TEST_F(InterpreterAssemblerTest, LoadConstantPoolEntry) { |
+ TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) { |
+ InterpreterAssemblerForTest m(this, bytecode); |
+ Node* index = m.Int32Constant(2); |
+ Node* load_constant = m.LoadConstantPoolEntry(index); |
+ Matcher<Node*> constant_pool_matcher = m.IsLoad( |
+ kMachAnyTagged, |
+ IsParameter(Linkage::kInterpreterBytecodeArrayParameter), |
+ IsIntPtrConstant(BytecodeArray::kConstantPoolOffset - kHeapObjectTag)); |
+ EXPECT_THAT( |
+ load_constant, |
+ m.IsLoad(kMachAnyTagged, constant_pool_matcher, |
+ IsIntPtrAdd( |
+ IsIntPtrConstant(FixedArray::kHeaderSize - kHeapObjectTag), |
+ IsWordShl(index, IsInt32Constant(kPointerSizeLog2))))); |
+ } |
+} |
+ |
+ |
TARGET_TEST_F(InterpreterAssemblerTest, LoadContextSlot) { |
TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) { |
InterpreterAssemblerForTest m(this, bytecode); |