flags |= JIT_FLAG_FULL_AOT;
if (acfg->llvm)
flags |= JIT_FLAG_LLVM;
+ if (acfg->aot_opts.no_direct_calls)
+ flags |= JIT_FLAG_NO_DIRECT_ICALLS;
cfg = mini_method_compile (method, acfg->opts, mono_get_root_domain (), flags, 0);
mono_loader_clear_error ();
* threads when debugging.
*/
if (info->no_raise) {
- if (cfg->compile_aot) {
- // FIXME: This might be loaded into a runtime during debugging
- // even if it is not compiled using 'soft-debug'.
- } else {
- no_wrapper = TRUE;
- /* LLVM on amd64 can't handle calls to non-32 bit addresses */
- if ((cfg->compile_llvm && SIZEOF_VOID_P == 8) || cfg->gen_seq_points_debug_data)
- no_wrapper = FALSE;
- }
+ no_wrapper = TRUE;
+ /* LLVM on amd64 can't handle calls to non-32 bit addresses */
+ if ((cfg->compile_llvm && SIZEOF_VOID_P == 8) || cfg->gen_seq_points_debug_data || cfg->disable_direct_icalls)
+ no_wrapper = FALSE;
}
if (no_wrapper) {
gboolean run_cctors = (flags & JIT_FLAG_RUN_CCTORS) ? 1 : 0;
gboolean compile_aot = (flags & JIT_FLAG_AOT) ? 1 : 0;
gboolean full_aot = (flags & JIT_FLAG_FULL_AOT) ? 1 : 0;
+ gboolean disable_direct_icalls = (flags & JIT_FLAG_NO_DIRECT_ICALLS) ? 1 : 0;
gboolean gsharedvt_method = FALSE;
#ifdef ENABLE_LLVM
gboolean llvm = (flags & JIT_FLAG_LLVM) ? 1 : 0;
cfg->explicit_null_checks = debug_options.explicit_null_checks;
cfg->soft_breakpoints = debug_options.soft_breakpoints;
cfg->check_pinvoke_callconv = debug_options.check_pinvoke_callconv;
+ cfg->disable_direct_icalls = disable_direct_icalls;
if (try_generic_shared)
cfg->generic_sharing_context = (MonoGenericSharingContext*)&cfg->gsctx;
cfg->compile_llvm = try_llvm;
JIT_FLAG_FULL_AOT = (1 << 2),
/* Whenever to compile with LLVM */
JIT_FLAG_LLVM = (1 << 3),
+ /* Whenever to disable direct calls to direct calls to icall functions */
+ JIT_FLAG_NO_DIRECT_ICALLS = (1 << 4)
} JitFlags;
/* Bit-fields in the MonoBasicBlock.region */
guint disable_vreg_to_lvreg : 1;
guint disable_deadce_vars : 1;
guint disable_out_of_line_bblocks : 1;
+ guint disable_direct_icalls : 1;
guint create_lmf_var : 1;
/*
* When this is set, the code to push/pop the LMF from the LMF stack is generated as IR