diff options
-rwxr-xr-x | mono/mini/ChangeLog | 7 | ||||
-rw-r--r-- | mono/mini/mini-llvm.c | 9 | ||||
-rw-r--r-- | mono/mini/mini-trampolines.c | 14 |
3 files changed, 16 insertions, 14 deletions
diff --git a/mono/mini/ChangeLog b/mono/mini/ChangeLog index 52c445304aa..7a3851e22c1 100755 --- a/mono/mini/ChangeLog +++ b/mono/mini/ChangeLog @@ -1,5 +1,12 @@ 2010-06-27 Zoltan Varga <vargaz@gmail.com> + * mini-trampolines.c (common_call_trampoline): Remove the code which created static + rgctx trampolines when called from LLVM, they won't work for dynamic rgctx arguments + if the callsite is patched. + + * mini-llvm.c (process_call): Disable calls which need an rgctx arg if not using + the llvm branch. + * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Fix the name of the trampoline in the xdebug info. diff --git a/mono/mini/mini-llvm.c b/mono/mini/mini-llvm.c index 41896d8dd7d..a970bc8b258 100644 --- a/mono/mini/mini-llvm.c +++ b/mono/mini/mini-llvm.c @@ -1646,6 +1646,15 @@ process_call (EmitContext *ctx, MonoBasicBlock *bb, LLVMBuilderRef *builder_ref, if (call->rgctx_arg_reg && !IS_LLVM_MONO_BRANCH) LLVM_FAILURE (ctx, "rgctx reg in call"); + if (call->rgctx_reg && !IS_LLVM_MONO_BRANCH) { + /* + * It might be possible to support this by creating a static rgctx trampoline, but + * common_call_trampoline () would patch callsites to call the trampoline, which + * would be incorrect if the rgctx arg is computed dynamically. + */ + LLVM_FAILURE (ctx, "rgctx reg"); + } + cinfo = call->cinfo; if (call->rgctx_arg_reg) cinfo->rgctx_arg = TRUE; diff --git a/mono/mini/mini-trampolines.c b/mono/mini/mini-trampolines.c index 32abc7618f4..7d5bcec2e22 100644 --- a/mono/mini/mini-trampolines.c +++ b/mono/mini/mini-trampolines.c @@ -385,20 +385,6 @@ common_call_trampoline (mgreg_t *regs, guint8 *code, gpointer arg, guint8* tramp } #endif -#ifdef MONO_ARCH_LLVM_SUPPORTED - if (!vtable_slot && code && !need_rgctx_tramp && mono_method_needs_static_rgctx_invoke (m, FALSE)) { - /* - * Call this only if the called method is shared, cause it is slow/loads a lot of - * data in AOT. - */ - ji = mini_jit_info_table_find (mono_domain_get (), (char*)code, NULL); - if (ji && ji->from_llvm) { - /* LLVM can't pass an rgctx arg */ - need_rgctx_tramp = TRUE; - } - } -#endif - /* * The virtual check is needed because is_generic_method_definition (m) could * return TRUE for methods used in IMT calls too. |