MONO_EMIT_NEW_UNALU (cfg, OP_MOVE, rgctx_reg, rgctx_arg->dreg);
call = (MonoCallInst*)mono_emit_calli (cfg, sig, args, addr);
mono_call_inst_add_outarg_reg (cfg, call, rgctx_reg, MONO_ARCH_RGCTX_REG, FALSE);
+ cfg->uses_rgctx_reg = TRUE;
return (MonoInst*)call;
#else
g_assert_not_reached ();
ins = (MonoInst*)mono_emit_calli (cfg, fsig, sp, addr);
call = (MonoCallInst*)ins;
mono_call_inst_add_outarg_reg (cfg, call, rgctx_reg, MONO_ARCH_RGCTX_REG, FALSE);
+ cfg->uses_rgctx_reg = TRUE;
#else
- GENERIC_SHARING_FAILURE (*ip);
+ NOT_IMPLEMENTED;
#endif
} else {
ins = (MonoInst*)mono_emit_calli (cfg, fsig, sp, addr);
ins = (MonoInst*)mono_emit_method_call_full (cfg, cmethod, fsig, sp, virtual ? sp [0] : NULL, NULL);
call = (MonoCallInst*)ins;
mono_call_inst_add_outarg_reg (cfg, call, rgctx_reg, MONO_ARCH_RGCTX_REG, FALSE);
+ cfg->uses_rgctx_reg = TRUE;
#else
- GENERIC_SHARING_FAILURE (*ip);
+ NOT_IMPLEMENTED;
#endif
} else if (imt_arg) {
ins = (MonoInst*)mono_emit_method_call_full (cfg, cmethod, fsig, sp, virtual ? sp [0] : NULL, imt_arg);
call = (MonoCallInst*)mono_emit_abs_call (cfg, MONO_PATCH_INFO_GENERIC_CLASS_INIT, NULL, helper_sig_generic_class_init_trampoline, &vtable);
#ifdef MONO_ARCH_VTABLE_REG
mono_call_inst_add_outarg_reg (cfg, call, vtable->dreg, MONO_ARCH_VTABLE_REG, FALSE);
+ cfg->uses_vtable_reg = TRUE;
#else
NOT_IMPLEMENTED;
#endif
EMIT_GET_RGCTX (rgctx, context_used);
ins = emit_get_rgctx_klass (cfg, context_used, rgctx, tclass, MONO_RGCTX_INFO_REFLECTION_TYPE);
} else if (cfg->compile_aot) {
- /*
- * FIXME: We would have to include the context into the
- * aot constant too (tests/generic-array-type.2.exe).
- */
- if (generic_context)
- cfg->disable_aot = TRUE;
EMIT_NEW_TYPE_FROM_HANDLE_CONST (cfg, ins, image, n);
} else {
EMIT_NEW_PCONST (cfg, ins, mono_type_get_object (cfg->domain, handle));