Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mono / mini / tramp-s390x.c
index b0333d3cf18a92c3cfbca8fdec243131d1216168..e3262fbe9de16e3e7e0af9cddd9e05517d01ab89 100644 (file)
@@ -190,8 +190,7 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
                
        code = buf = mono_global_codeman_reserve(512);
                
-       if ((tramp_type == MONO_TRAMPOLINE_JUMP) ||
-           (tramp_type == MONO_TRAMPOLINE_HANDLER_BLOCK_GUARD)) 
+       if (tramp_type == MONO_TRAMPOLINE_JUMP) 
                has_caller = 0;
        else
                has_caller = 1;
@@ -527,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);
@@ -560,8 +561,7 @@ mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info
 /*------------------------------------------------------------------*/
 
 gpointer
-mono_arch_get_static_rgctx_trampoline (gpointer arg,
-                                                                          gpointer addr)
+mono_arch_get_static_rgctx_trampoline (gpointer arg, gpointer addr)
 {
        guint8 *code, *start;
        gint32 displace;
@@ -590,61 +590,17 @@ mono_arch_get_static_rgctx_trampoline (gpointer arg,
 
 /*------------------------------------------------------------------*/
 /*                                                                  */
-/* Name                - handler_block_trampoline_helper                   */
+/* Name            - mono_arch_get_enter_icall_trampoline.                 */
 /*                                                                  */
-/* Function    -                                                   */
-/*                                                                  */
-/*------------------------------------------------------------------*/
-
-static void
-handler_block_trampoline_helper (gpointer *ptr)
-{
-       MonoJitTlsData *jit_tls = mono_tls_get_jit_tls ();
-       *ptr = jit_tls->handler_block_return_address;
-}
-
-/*========================= End of Function ========================*/
-
-/*------------------------------------------------------------------*/
-/*                                                                  */
-/* Name                - mono_arch_create_handler_block_trampoline         */
-/*                                                                  */
-/* Function    -                                                   */
+/* Function -                                                      */
 /*                                                                  */
 /*------------------------------------------------------------------*/
 
 gpointer
-mono_arch_create_handler_block_trampoline (MonoTrampInfo **info, gboolean aot)
+mono_arch_get_enter_icall_trampoline (MonoTrampInfo **info)
 {
-       guint8 *tramp = mono_get_trampoline_code (MONO_TRAMPOLINE_HANDLER_BLOCK_GUARD);
-       guint8 *code, *buf;
-       int tramp_size = 64;
-       MonoJumpInfo *ji = NULL;
-       GSList *unwind_ops = NULL;
-
-       g_assert (!aot);
-
-       code = buf = mono_global_codeman_reserve (tramp_size);
-
-       /*
-        * This trampoline restore the call chain of the handler block 
-        * then jumps into the code that deals with it.
-        */
-
-       /*
-        * Slow path uses a C helper
-        */
-       S390_SET  (code, s390_r2, tramp);
-       S390_SET  (code, s390_r1, handler_block_trampoline_helper);
-       s390_br   (code, s390_r1);
-
-       mono_arch_flush_icache (buf, code - buf);
-       MONO_PROFILER_RAISE (jit_code_buffer, (buf, code - buf, MONO_PROFILER_CODE_BUFFER_HELPER, NULL));
-       g_assert (code - buf <= tramp_size);
-
-       *info = mono_tramp_info_create ("handler_block_trampoline", buf, code - buf, ji, unwind_ops);
-
-       return buf;
+       g_assert_not_reached ();
+       return NULL;
 }
 
 /*========================= End of Function ========================*/