MonoTraceSpec *mono_jit_trace_calls = NULL;
gboolean mono_break_on_exc = FALSE;
-#ifndef DISABLE_AOT
gboolean mono_compile_aot = FALSE;
-#endif
/* If this is set, no code is generated dynamically, everything is taken from AOT files */
gboolean mono_aot_only = FALSE;
/* Whenever to use IMT */
printf (" Create LVAR R%d (R%d, R%d)\n", inst->dreg, inst->dreg + 1, inst->dreg + 2);
}
+#ifdef MONO_ARCH_SOFT_FLOAT
+ if (cfg->opt & MONO_OPT_SSA) {
+ if (mono_type_is_float (type))
+ inst->flags = MONO_INST_VOLATILE;
+ }
+#endif
+
/* Allocate a dummy MonoInst for the first vreg */
MONO_INST_NEW (cfg, tree, OP_LOCAL);
tree->dreg = inst->dreg + 1;
call = mono_emit_call_args (cfg, bblock, sig, NULL, FALSE, FALSE, ip, FALSE);
call->inst.opcode = OP_TRAMPCALL_VTABLE;
- call->fptr = mono_get_trampoline_code (MONO_TRAMPOLINE_GENERIC_CLASS_INIT);
+ call->fptr = mono_create_generic_class_init_trampoline ();
call->inst.inst_left = vtable;
if (sp [2]->opcode == OP_PCONST && sp [2]->inst_p0 == NULL) {
MonoInst *load;
NEW_LDELEMA (cfg, load, sp, mono_defaults.object_class);
- MONO_INST_NEW (cfg, ins, stelem_to_stind [*ip - CEE_STELEM_I]);
+ MONO_INST_NEW (cfg, ins, CEE_STIND_REF);
ins->inst_left = load;
ins->inst_right = sp [2];
MONO_ADD_INS (bblock, ins);
} else {
NEW_METHODCONST (cfg, argconst, cmethod);
}
- if (method->wrapper_type != MONO_WRAPPER_SYNCHRONIZED)
- temp = mono_emit_jit_icall (cfg, bblock, mono_ldftn, &argconst, ip);
- else
- temp = mono_emit_jit_icall (cfg, bblock, mono_ldftn_nosync, &argconst, ip);
+ temp = mono_emit_jit_icall (cfg, bblock, mono_ldftn, &argconst, ip);
NEW_TEMPLOAD (cfg, *sp, temp);
sp ++;
for (i = 0; i < header->num_clauses; ++i) {
MonoExceptionClause *clause = &header->clauses [i];
- if (MONO_OFFSET_IN_HANDLER (clause, ip - header->code) && !(clause->flags & MONO_EXCEPTION_CLAUSE_FINALLY))
+ if (MONO_OFFSET_IN_HANDLER (clause, ip - header->code) && !(clause->flags & MONO_EXCEPTION_CLAUSE_FINALLY)) {
handler_offset = clause->handler_offset;
+ break;
+ }
}
bblock->flags |= BB_EXCEPTION_UNSAFE;
wrapper = mono_marshal_get_icall_wrapper (callinfo->sig, name, callinfo->func, check_for_pending_exc);
g_free (name);
- trampoline = mono_create_ftnptr (domain, mono_create_jit_trampoline_in_domain (domain, wrapper, TRUE));
+ trampoline = mono_create_ftnptr (domain, mono_create_jit_trampoline_in_domain (domain, wrapper));
mono_register_jit_icall_wrapper (callinfo, trampoline);
callinfo->trampoline = trampoline;
return NULL;
MONO_INST_NEW (cfg, ins, OP_TLS_GET);
- ins->dreg = mono_regstate_next_int (cfg->rs);
+ ins->dreg = cfg->new_ir ? mono_alloc_preg (cfg) : mono_regstate_next_int (cfg->rs);
ins->inst_offset = offset;
return ins;
#else
case MONO_PATCH_INFO_IMAGE:
case MONO_PATCH_INFO_INTERNAL_METHOD:
case MONO_PATCH_INFO_JIT_ICALL_ADDR:
- case MONO_PATCH_INFO_WRAPPER:
case MONO_PATCH_INFO_FIELD:
case MONO_PATCH_INFO_SFLDA:
return (ji->type << 8) | (gssize)ji->data.target;
break;
}
case MONO_PATCH_INFO_METHOD_JUMP:
- target = mono_create_jump_trampoline (domain, patch_info->data.method, TRUE);
+ target = mono_create_jump_trampoline (domain, patch_info->data.method, FALSE);
break;
case MONO_PATCH_INFO_METHOD:
if (patch_info->data.method == method) {
/* get the trampoline to the method from the domain */
if (method && method->wrapper_type == MONO_WRAPPER_STATIC_RGCTX_INVOKE) {
target = mono_create_jit_trampoline_in_domain (mono_domain_get (),
- patch_info->data.method, FALSE);
+ patch_info->data.method);
} else {
target = mono_create_jit_trampoline (patch_info->data.method);
}
break;
}
case MONO_PATCH_INFO_GENERIC_CLASS_INIT:
- target = mono_get_trampoline_code (MONO_TRAMPOLINE_GENERIC_CLASS_INIT);
+ target = mono_create_generic_class_init_trampoline ();
break;
default:
g_assert_not_reached ();
register_icall (mono_array_new_specific, "mono_array_new_specific", "object ptr int32", FALSE);
register_icall (mono_runtime_class_init, "mono_runtime_class_init", "void ptr", FALSE);
register_icall (mono_ldftn, "mono_ldftn", "ptr ptr", FALSE);
- register_icall (mono_ldftn_nosync, "mono_ldftn_nosync", "ptr ptr", FALSE);
register_icall (mono_ldvirtfn, "mono_ldvirtfn", "ptr object ptr", FALSE);
register_icall (mono_ldvirtfn_gshared, "mono_ldvirtfn_gshared", "ptr object ptr", FALSE);
register_icall (mono_helper_compile_generic_method, "compile_generic_method", "ptr object ptr ptr", FALSE);
register_icall (mono_array_new_2, "mono_array_new_2", "object ptr int int", FALSE);
#endif
+ mono_generic_sharing_init ();
+
+ if (mono_compile_aot)
+ /*
+ * Avoid running managed code when AOT compiling, since the platform
+ * might only support aot-only execution.
+ */
+ mono_runtime_set_no_exec (TRUE);
+
#define JIT_RUNTIME_WORKS
#ifdef JIT_RUNTIME_WORKS
mono_install_runtime_cleanup ((MonoDomainFunc)mini_cleanup);
mono_runtime_init (domain, mono_thread_start_cb, mono_thread_attach_cb);
+ mono_thread_attach (domain);
#endif
- mono_generic_sharing_init ();
-
- mono_thread_attach (domain);
-
mono_profiler_runtime_initialized ();
MONO_PROBE_VES_INIT_END ();