[netcore] Add intrinsic implementation for Unsafe.InitBlockUnaligned
authorFilip Navara <navara@emclient.com>
Fri, 30 Aug 2019 18:40:14 +0000 (20:40 +0200)
committerMarek Safar <marek.safar@gmail.com>
Tue, 3 Sep 2019 16:40:06 +0000 (18:40 +0200)
Commit migrated from https://github.com/mono/mono/commit/4ae804bb33e394ee5f5a32742e6b500cde913cff

src/mono/mono/mini/intrinsics.c

index 8eeb551..70ee921 100644 (file)
@@ -490,6 +490,16 @@ emit_unsafe_intrinsics (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignatu
                ins->type = STACK_PTR;
                return ins;
        }
+#ifdef ENABLE_NETCORE
+       else if (!strcmp (cmethod->name, "InitBlockUnaligned")) {
+               g_assert (fsig->param_count == 3);
+
+               mini_emit_memory_init_bytes (cfg, args [0], args [1], args [2], MONO_INST_UNALIGNED);
+               MONO_INST_NEW (cfg, ins, OP_NOP);
+               MONO_ADD_INS (cfg->cbb, ins);
+               return ins;
+       }
+#endif
 
        return NULL;
 }