Skip to content

Commit

Permalink
[mono] Remove intrinsic support for Object.GetRawData
Browse files Browse the repository at this point in the history
  • Loading branch information
lambdageek committed Oct 30, 2020
1 parent 6a8bc4d commit f45059f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
16 changes: 0 additions & 16 deletions src/mono/mono/mini/interp/transform.c
Original file line number Diff line number Diff line change
Expand Up @@ -1951,22 +1951,6 @@ interp_handle_intrinsics (TransformData *td, MonoMethod *target_method, MonoClas
#endif
)
*op = MINT_INTRINS_GET_TYPE;
#ifdef ENABLE_NETCORE
else if (!strcmp (tm, "GetRawData")) {
#if SIZEOF_VOID_P == 8
interp_add_ins (td, MINT_LDC_I8_S);
#else
interp_add_ins (td, MINT_LDC_I4_S);
#endif
td->last_ins->data [0] = (gint16) MONO_ABI_SIZEOF (MonoObject);

interp_add_ins (td, MINT_ADD_P);
SET_SIMPLE_TYPE (td->sp - 1, STACK_TYPE_MP);

td->ip += 5;
return TRUE;
}
#endif
} else if (in_corlib && target_method->klass == mono_defaults.enum_class && !strcmp (tm, "HasFlag")) {
gboolean intrinsify = FALSE;
MonoClass *base_klass = NULL;
Expand Down
6 changes: 0 additions & 6 deletions src/mono/mono/mini/intrinsics.c
Original file line number Diff line number Diff line change
Expand Up @@ -680,12 +680,6 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
int dreg = alloc_preg (cfg);
EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOAD_MEMBASE, dreg, args [0]->dreg, 0);
return ins;
} else if (in_corlib && cmethod->klass == mono_defaults.object_class) {
if (!strcmp (cmethod->name, "GetRawData")) {
int dreg = alloc_preg (cfg);
EMIT_NEW_BIALU_IMM (cfg, ins, OP_PADD_IMM, dreg, args [0]->dreg, MONO_ABI_SIZEOF (MonoObject));
return ins;
}
}

if (!(cfg->opt & MONO_OPT_INTRINS))
Expand Down

0 comments on commit f45059f

Please sign in to comment.