diff --git a/runtime/vm/compiler/stub_code_compiler.cc b/runtime/vm/compiler/stub_code_compiler.cc index 584edce98e1..f561a72b383 100644 --- a/runtime/vm/compiler/stub_code_compiler.cc +++ b/runtime/vm/compiler/stub_code_compiler.cc @@ -3345,7 +3345,8 @@ void StubCodeCompiler::GenerateSubtypeTestCacheSearch( ZERO, (n >= 5) ? &load_function_type_arguments : &initialized); __ ExtractBitField( instance_type_args_reg, TypeTestABI::kScratchReg, - UntaggedClosure::InstantiatorTypeArgumentsIndexBits::shift(), + UntaggedClosure::InstantiatorTypeArgumentsIndexBits::shift() + + kSmiTagShift, UntaggedClosure::InstantiatorTypeArgumentsIndexBits::bitsize()); __ LoadIndexedCompressed( instance_type_args_reg, TypeTestABI::kInstanceReg, @@ -3360,7 +3361,8 @@ void StubCodeCompiler::GenerateSubtypeTestCacheSearch( (n >= 6) ? &load_delayed_type_arguments : &initialized); __ ExtractBitField( parent_fun_type_args_reg, TypeTestABI::kScratchReg, - UntaggedClosure::FunctionTypeArgumentsIndexBits::shift(), + UntaggedClosure::FunctionTypeArgumentsIndexBits::shift() + + kSmiTagShift, UntaggedClosure::FunctionTypeArgumentsIndexBits::bitsize()); __ LoadIndexedCompressed( parent_fun_type_args_reg, TypeTestABI::kInstanceReg, diff --git a/runtime/vm/compiler/stub_code_compiler_ia32.cc b/runtime/vm/compiler/stub_code_compiler_ia32.cc index ac5418ebc09..884e4eba663 100644 --- a/runtime/vm/compiler/stub_code_compiler_ia32.cc +++ b/runtime/vm/compiler/stub_code_compiler_ia32.cc @@ -2795,7 +2795,8 @@ void StubCodeCompiler::GenerateSubtypeNTestCacheStub(Assembler* assembler, __ ExtractBitField( STCInternal::kInstanceInstantiatorTypeArgumentsReg, STCInternal::kScratchReg, - UntaggedClosure::InstantiatorTypeArgumentsIndexBits::shift(), + UntaggedClosure::InstantiatorTypeArgumentsIndexBits::shift() + + kSmiTagShift, UntaggedClosure::InstantiatorTypeArgumentsIndexBits::bitsize()); __ Load( STCInternal::kInstanceInstantiatorTypeArgumentsReg, @@ -2812,7 +2813,8 @@ void StubCodeCompiler::GenerateSubtypeNTestCacheStub(Assembler* assembler, &no_function_type_arguments); __ ExtractBitField( STCInternal::kScratchReg, STCInternal::kScratchReg, - UntaggedClosure::FunctionTypeArgumentsIndexBits::shift(), + UntaggedClosure::FunctionTypeArgumentsIndexBits::shift() + + kSmiTagShift, UntaggedClosure::FunctionTypeArgumentsIndexBits::bitsize()); __ pushl(FieldAddress(TypeTestABI::kInstanceReg, STCInternal::kScratchReg, TIMES_WORD_SIZE,