Skip load if same register
authorNeale Ferguson <neale@sinenomine.net>
Fri, 18 Aug 2017 15:22:04 +0000 (11:22 -0400)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Wed, 23 Aug 2017 18:42:48 +0000 (20:42 +0200)
mono/mini/tramp-s390x.c

index fed21162dcf9853121c132ccb21f164a9dfa2752..e3262fbe9de16e3e7e0af9cddd9e05517d01ab89 100644 (file)
@@ -526,7 +526,9 @@ mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info
        g_free (rgctx_null_jumps);
 
        /* move the rgctx pointer to the VTABLE register */
+#if MONO_ARCH_VTABLE_REG != s390_r2
        s390_lgr (code, MONO_ARCH_VTABLE_REG, s390_r2);
+#endif
 
        tramp = mono_arch_create_specific_trampoline (GUINT_TO_POINTER (slot),
                MONO_TRAMPOLINE_RGCTX_LAZY_FETCH, mono_get_root_domain (), NULL);