|
|
@@ -4327,13 +4327,19 @@ gboolean mono_aot_mode_is_full (MonoAotOptions *opts)
|
|
|
return opts->mode == MONO_AOT_MODE_FULL;
|
|
|
}
|
|
|
|
|
|
+static
|
|
|
+gboolean mono_aot_mode_is_hybrid (MonoAotOptions *opts)
|
|
|
+{
|
|
|
+ return opts->mode == MONO_AOT_MODE_HYBRID;
|
|
|
+}
|
|
|
+
|
|
|
static void add_generic_class_with_depth (MonoAotCompile *acfg, MonoClass *klass, int depth, const char *ref);
|
|
|
|
|
|
static void
|
|
|
add_generic_class (MonoAotCompile *acfg, MonoClass *klass, gboolean force, const char *ref)
|
|
|
{
|
|
|
/* This might lead to a huge code blowup so only do it if neccesary */
|
|
|
- if (!mono_aot_mode_is_full (&acfg->aot_opts) && !force)
|
|
|
+ if (!mono_aot_mode_is_full (&acfg->aot_opts) && !mono_aot_mode_is_hybrid (&acfg->aot_opts) && !force)
|
|
|
return;
|
|
|
|
|
|
add_generic_class_with_depth (acfg, klass, 0, ref);
|
|
|
@@ -8363,7 +8369,7 @@ emit_code (MonoAotCompile *acfg)
|
|
|
method = cfg->orig_method;
|
|
|
|
|
|
/* Emit unbox trampoline */
|
|
|
- if (mono_aot_mode_is_full (&acfg->aot_opts) && cfg->orig_method->klass->valuetype && !(acfg->aot_opts.llvm_only && cfg->compile_llvm)) {
|
|
|
+ if (mono_aot_mode_is_full (&acfg->aot_opts) && cfg->orig_method->klass->valuetype) {
|
|
|
sprintf (symbol, "ut_%d", get_method_index (acfg, method));
|
|
|
|
|
|
emit_section_change (acfg, ".text", 0);
|
|
|
@@ -8445,11 +8451,7 @@ emit_code (MonoAotCompile *acfg)
|
|
|
int call_size;
|
|
|
|
|
|
if (acfg->cfgs [i]) {
|
|
|
- if (acfg->aot_opts.llvm_only && acfg->cfgs [i]->compile_llvm)
|
|
|
- /* Obtained by calling a generated function in the LLVM image */
|
|
|
- arch_emit_direct_call (acfg, symbol, FALSE, FALSE, NULL, &call_size);
|
|
|
- else
|
|
|
- arch_emit_direct_call (acfg, acfg->cfgs [i]->asm_symbol, FALSE, acfg->thumb_mixed && acfg->cfgs [i]->compile_llvm, NULL, &call_size);
|
|
|
+ arch_emit_direct_call (acfg, acfg->cfgs [i]->asm_symbol, FALSE, acfg->thumb_mixed && acfg->cfgs [i]->compile_llvm, NULL, &call_size);
|
|
|
} else {
|
|
|
arch_emit_direct_call (acfg, symbol, FALSE, FALSE, NULL, &call_size);
|
|
|
}
|
|
|
@@ -8478,7 +8480,7 @@ emit_code (MonoAotCompile *acfg)
|
|
|
|
|
|
method = cfg->orig_method;
|
|
|
|
|
|
- if (mono_aot_mode_is_full (&acfg->aot_opts) && cfg->orig_method->klass->valuetype && !(acfg->aot_opts.llvm_only && cfg->compile_llvm)) {
|
|
|
+ if (mono_aot_mode_is_full (&acfg->aot_opts) && cfg->orig_method->klass->valuetype) {
|
|
|
index = get_method_index (acfg, method);
|
|
|
|
|
|
emit_int32 (acfg, index);
|
|
|
@@ -8508,7 +8510,7 @@ emit_code (MonoAotCompile *acfg)
|
|
|
|
|
|
method = cfg->orig_method;
|
|
|
|
|
|
- if (mono_aot_mode_is_full (&acfg->aot_opts) && cfg->orig_method->klass->valuetype && !(acfg->aot_opts.llvm_only && cfg->compile_llvm)) {
|
|
|
+ if (mono_aot_mode_is_full (&acfg->aot_opts) && cfg->orig_method->klass->valuetype) {
|
|
|
#ifdef MONO_ARCH_AOT_SUPPORTED
|
|
|
int call_size;
|
|
|
|
|
|
@@ -10437,7 +10439,7 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options)
|
|
|
}
|
|
|
|
|
|
#if defined(MONO_ARCH_GSHAREDVT_SUPPORTED)
|
|
|
- if (acfg->aot_opts.llvm_only || mono_aot_mode_is_full (&acfg->aot_opts)) {
|
|
|
+ if (acfg->aot_opts.llvm_only || mono_aot_mode_is_full (&acfg->aot_opts) || mono_aot_mode_is_hybrid (&acfg->aot_opts)) {
|
|
|
acfg->opts |= MONO_OPT_GSHAREDVT;
|
|
|
opts |= MONO_OPT_GSHAREDVT;
|
|
|
}
|