From f45059f59a7b598a3f05f8748845a44deaaa51fa Mon Sep 17 00:00:00 2001 From: Aleksey Kliger Date: Fri, 30 Oct 2020 16:36:10 -0400 Subject: [PATCH] [mono] Remove intrinsic support for Object.GetRawData --- src/mono/mono/mini/interp/transform.c | 16 ---------------- src/mono/mono/mini/intrinsics.c | 6 ------ 2 files changed, 22 deletions(-) diff --git a/src/mono/mono/mini/interp/transform.c b/src/mono/mono/mini/interp/transform.c index 2711262fbbb65..5044a7da31747 100644 --- a/src/mono/mono/mini/interp/transform.c +++ b/src/mono/mono/mini/interp/transform.c @@ -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; diff --git a/src/mono/mono/mini/intrinsics.c b/src/mono/mono/mini/intrinsics.c index dccb2c51d4fce..f3d34d9c4a155 100644 --- a/src/mono/mono/mini/intrinsics.c +++ b/src/mono/mono/mini/intrinsics.c @@ -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))