diff --git a/src/mono/mono/mini/mini-amd64.c b/src/mono/mono/mini/mini-amd64.c index 6278ae4b9aea7..a45878e16e7d7 100644 --- a/src/mono/mono/mini/mini-amd64.c +++ b/src/mono/mono/mini/mini-amd64.c @@ -2761,6 +2761,7 @@ mono_arch_start_dyn_call (MonoDynCallInfo *info, gpointer **args, guint8 *ret, g switch (t->type) { case MONO_TYPE_OBJECT: case MONO_TYPE_PTR: + case MONO_TYPE_FNPTR: case MONO_TYPE_I: case MONO_TYPE_U: #if !defined(MONO_ARCH_ILP32) diff --git a/src/mono/mono/mini/mini-arm.c b/src/mono/mono/mini/mini-arm.c index 29546e1c23199..a6e6328e814af 100644 --- a/src/mono/mono/mini/mini-arm.c +++ b/src/mono/mono/mini/mini-arm.c @@ -3001,6 +3001,7 @@ mono_arch_start_dyn_call (MonoDynCallInfo *info, gpointer **args, guint8 *ret, g switch (t->type) { case MONO_TYPE_OBJECT: case MONO_TYPE_PTR: + case MONO_TYPE_FNPTR: case MONO_TYPE_I: case MONO_TYPE_U: p->regs [slot] = (host_mgreg_t)(gsize)*arg; diff --git a/src/mono/mono/mini/mini-runtime.c b/src/mono/mono/mini/mini-runtime.c index 53cab36cfb255..7fce0add222d3 100644 --- a/src/mono/mono/mini/mini-runtime.c +++ b/src/mono/mono/mini/mini-runtime.c @@ -3622,7 +3622,7 @@ mono_jit_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObjec if (m_type_is_byref (t)) { args [pindex ++] = ¶ms [i]; - } else if (MONO_TYPE_IS_REFERENCE (t) || t->type == MONO_TYPE_PTR) { + } else if (MONO_TYPE_IS_REFERENCE (t) || t->type == MONO_TYPE_PTR || t->type == MONO_TYPE_FNPTR) { args [pindex ++] = ¶ms [i]; } else { args [pindex ++] = params [i];