Add z14 support and extend z13 support
[mono.git] / mono / mini / mini-generic-sharing.c
index 587d368a4186ce564c123e0969c783d24a0fe667..243c83cbe5d9cbbbe8e902d1d27ab72a043269e4 100644 (file)
@@ -390,7 +390,17 @@ info_has_identity (MonoRgctxInfoType info_type)
 /*
  * LOCKING: loader lock
  */
+#if defined(HOST_ANDROID) && defined(TARGET_ARM)
+/* work around for HW bug on Nexus9 when running on armv7 */
+#ifdef __clang__
+static __attribute__ ((optnone)) void
+#else
+/* gcc */
+static __attribute__ ((optimize("O0"))) void
+#endif
+#else
 static void
+#endif
 rgctx_template_set_slot (MonoImage *image, MonoRuntimeGenericContextTemplate *template_, int type_argc,
        int slot, gpointer data, MonoRgctxInfoType info_type)
 {
@@ -1493,7 +1503,8 @@ mini_get_interp_in_wrapper (MonoMethodSignature *sig)
 
        mb = mono_mb_new (mono_defaults.object_class, name, MONO_WRAPPER_UNKNOWN);
 
-       // FIXME: save lmf
+       /* This is needed to be able to unwind out of interpreted code */
+       mb->method->save_lmf = 1;
 
 #ifndef DISABLE_JIT
        if (sig->ret->type != MONO_TYPE_VOID)
@@ -3497,6 +3508,7 @@ mini_get_shared_gparam (MonoType *t, MonoType *constraint)
        copy = (MonoGSharedGenericParam *)mono_image_alloc0 (image, sizeof (MonoGSharedGenericParam));
        memcpy (&copy->param, par, sizeof (MonoGenericParamFull));
        copy->param.info.pklass = NULL;
+       constraint = mono_metadata_type_dup (image, constraint);
        name = get_shared_gparam_name (constraint->type, ((MonoGenericParamFull*)copy)->info.name);
        copy->param.info.name = mono_image_strdup (image, name);
        g_free (name);