diff --git a/src/mono/mono/mini/interp/transform.c b/src/mono/mono/mini/interp/transform.c index e8b967827ddd1e..819e02938675cf 100644 --- a/src/mono/mono/mini/interp/transform.c +++ b/src/mono/mono/mini/interp/transform.c @@ -2306,7 +2306,16 @@ interp_handle_intrinsics (TransformData *td, MonoMethod *target_method, MonoClas *op = MINT_INITBLK; } } else if (in_corlib && !strcmp (klass_name_space, "System.Runtime.CompilerServices") && !strcmp (klass_name, "RuntimeHelpers")) { - if (!strcmp (tm, "GetHashCode") || !strcmp (tm, "InternalGetHashCode")) { + if (!strcmp (tm, "get_OffsetToStringData")) { + g_assert (csignature->param_count == 0); + int offset = MONO_STRUCT_OFFSET (MonoString, chars); + interp_add_ins (td, MINT_LDC_I4); + WRITE32_INS (td->last_ins, 0, &offset); + push_simple_type (td, STACK_TYPE_I4); + interp_ins_set_dreg (td->last_ins, td->sp [-1].local); + td->ip += 5; + return TRUE; + } else if (!strcmp (tm, "GetHashCode") || !strcmp (tm, "InternalGetHashCode")) { *op = MINT_INTRINS_GET_HASHCODE; } else if (!strcmp (tm, "TryGetHashCode")) { *op = MINT_INTRINS_TRY_GET_HASHCODE;