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;
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;
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
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 ();