addr = mono_create_jump_trampoline (mono_domain_get (), method, TRUE);
- return addr;
+ return mono_create_ftnptr (mono_domain_get (), addr);
}
/*
addr = mono_create_jump_trampoline (mono_domain_get (), method, FALSE);
- return addr;
+ return mono_create_ftnptr (mono_domain_get (), addr);
}
static void*
return 0;
}
-#ifdef MONO_ARCH_EMULATE_MUL_DIV
-
-static gint32
-mono_imul (gint32 a, gint32 b)
-{
- MONO_ARCH_SAVE_REGS;
-
- return a * b;
-}
+#if defined(MONO_ARCH_EMULATE_MUL_DIV) || defined(MONO_ARCH_EMULATE_DIV)
static gint32
mono_idiv (gint32 a, gint32 b)
return a % b;
}
+#endif
+
+#ifdef MONO_ARCH_EMULATE_MUL_DIV
+
+static gint32
+mono_imul (gint32 a, gint32 b)
+{
+ MONO_ARCH_SAVE_REGS;
+
+ return a * b;
+}
+
static gint32
mono_imul_ovf (gint32 a, gint32 b)
{
if (rank == pcount) {
/* Only lengths provided. */
- lower_bounds = NULL;
+ if (cm->klass->byval_arg.type == MONO_TYPE_ARRAY) {
+ lower_bounds = alloca (sizeof (guint32) * rank);
+ memset (lower_bounds, 0, sizeof (guint32) * rank);
+ } else {
+ lower_bounds = NULL;
+ }
} else {
g_assert (pcount == (rank * 2));
/* lower bounds are first. */
gpointer addr;
vmethod = mono_object_get_virtual_method (obj, method);
- inflated = mono_class_inflate_generic_method (vmethod, context, NULL);
+ inflated = mono_class_inflate_generic_method (vmethod, context);
inflated = mono_get_inflated_method (inflated);
addr = mono_compile_method (inflated);
return addr;
}
+
+static MonoString*
+helper_ldstr (MonoImage *image, guint32 idx)
+{
+ return mono_ldstr (mono_domain_get (), image, idx);
+}