+#ifdef MONO_ARCH_EMULATE_LCONV_TO_R4
+static float
+mono_lconv_to_r4 (gint64 a)
+{
+ return (float)a;
+}
+#endif
+
+#ifdef MONO_ARCH_EMULATE_CONV_R8_UN
+static double
+mono_conv_to_r8_un (guint32 a)
+{
+ return (double)a;
+}
+#endif
+
+#ifdef MONO_ARCH_EMULATE_LCONV_TO_R8_UN
+static double
+mono_lconv_to_r8_un (guint64 a)
+{
+ return (double)a;
+}
+#endif
+
+static gpointer
+helper_compile_generic_method (MonoObject *obj, MonoMethod *method, MonoGenericContext *context)
+{
+ MonoMethod *vmethod, *inflated;
+ gpointer addr;
+
+ vmethod = mono_object_get_virtual_method (obj, method);
+ inflated = mono_class_inflate_generic_method (vmethod, context, NULL);
+ inflated = mono_get_inflated_method (inflated);
+ addr = mono_compile_method (inflated);
+
+ return addr;
+}