Skip to content

Commit

Permalink
[llvm] Pass only the imt argument if both imt and rgctx arguments are…
Browse files Browse the repository at this point in the history
… required.

mono#7240
  • Loading branch information
vargaz committed Feb 24, 2018
1 parent f636486 commit 9370145
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mono/mini/mini-llvm.c
Expand Up @@ -3180,6 +3180,10 @@ process_call (EmitContext *ctx, MonoBasicBlock *bb, LLVMBuilderRef *builder_ref,
gboolean is_virtual, calli, preserveall;
LLVMBuilderRef builder = *builder_ref;

/* If both imt and rgctx arg are required, only pass the imt arg, the rgctx trampoline will pass the rgctx */
if (call->imt_arg_reg)
call->rgctx_arg_reg = 0;

if ((call->signature->call_convention != MONO_CALL_DEFAULT) && !((call->signature->call_convention == MONO_CALL_C) && ctx->llvm_only)) {
set_failure (ctx, "non-default callconv");
return;
Expand Down

0 comments on commit 9370145

Please sign in to comment.