diff --git a/src/coreclr/vm/methodtable.cpp b/src/coreclr/vm/methodtable.cpp index 6682bc57b0500..636fc3063c9ce 100644 --- a/src/coreclr/vm/methodtable.cpp +++ b/src/coreclr/vm/methodtable.cpp @@ -3443,6 +3443,11 @@ int MethodTable::GetLoongArch64PassStructInRegisterFlags(CORINFO_CLASS_HANDLE cl size = STRUCT_FIRST_FIELD_SIZE_IS8; } } + else if (fieldType == ELEMENT_TYPE_CLASS) + { + size = STRUCT_NO_FLOAT_FIELD; + goto _End_arg; + } else if (pFieldStart[0].GetSize() == 8) { size = STRUCT_FIRST_FIELD_SIZE_IS8; @@ -3534,6 +3539,11 @@ int MethodTable::GetLoongArch64PassStructInRegisterFlags(CORINFO_CLASS_HANDLE cl size |= STRUCT_SECOND_FIELD_SIZE_IS8; } } + else if (fieldType == ELEMENT_TYPE_CLASS) + { + size = STRUCT_NO_FLOAT_FIELD; + goto _End_arg; + } else if ((size & STRUCT_FLOAT_FIELD_FIRST) == 0) { size = STRUCT_NO_FLOAT_FIELD;