X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmini%2Ftramp-s390x.c;h=91aed0b96e22801406dbc4482762d9e10cc4d63b;hb=770ea9329202d7dad0f6abb92dcadd84a899b0d5;hp=56f1839ae4218621055cf9dd7884439d6a9c1d0d;hpb=2099acf5f4a80c46bf4e75e9d67b8db4f2c86bbd;p=mono.git diff --git a/mono/mini/tramp-s390x.c b/mono/mini/tramp-s390x.c index 56f1839ae42..91aed0b96e2 100644 --- a/mono/mini/tramp-s390x.c +++ b/mono/mini/tramp-s390x.c @@ -108,7 +108,7 @@ mono_arch_get_unbox_trampoline (MonoMethod *method, gpointer addr) g_assert ((code - start) <= 28); mono_arch_flush_icache (start, code - start); - mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_UNBOX_TRAMPOLINE, method); + MONO_PROFILER_RAISE (jit_code_buffer, (start, code - start, MONO_PROFILER_CODE_BUFFER_UNBOX_TRAMPOLINE, method)); snprintf(trampName, sizeof(trampName), "%s_unbox_trampoline", method->name); @@ -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; @@ -354,7 +353,7 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf /* Flush instruction cache, since we've generated code */ mono_arch_flush_icache (code, buf - code); - mono_profiler_code_buffer_new (buf, code - buf, MONO_PROFILER_CODE_BUFFER_GENERICS_TRAMPOLINE, NULL); + MONO_PROFILER_RAISE (jit_code_buffer, (buf, code - buf, MONO_PROFILER_CODE_BUFFER_GENERICS_TRAMPOLINE, NULL)); g_assert (info); tramp_name = mono_get_generic_trampoline_name (tramp_type); @@ -420,8 +419,9 @@ mono_arch_create_specific_trampoline (gpointer arg1, MonoTrampolineType tramp_ty /* Flush instruction cache, since we've generated code */ mono_arch_flush_icache (code, buf - code); - mono_profiler_code_buffer_new (buf, code - buf, MONO_PROFILER_CODE_BUFFER_SPECIFIC_TRAMPOLINE, - (void *) mono_get_generic_trampoline_simple_name (tramp_type)); + MONO_PROFILER_RAISE (jit_code_buffer, (buf, code - buf, + MONO_PROFILER_CODE_BUFFER_SPECIFIC_TRAMPOLINE, + (void *) mono_get_generic_trampoline_simple_name (tramp_type))); /* Sanity check */ g_assert ((buf - code) <= SPECIFIC_TRAMPOLINE_SIZE); @@ -536,7 +536,7 @@ mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info s390_jg (code, displace); mono_arch_flush_icache (buf, code - buf); - mono_profiler_code_buffer_new (buf, code - buf, MONO_PROFILER_CODE_BUFFER_GENERICS_TRAMPOLINE, NULL); + MONO_PROFILER_RAISE (jit_code_buffer, (buf, code - buf, MONO_PROFILER_CODE_BUFFER_GENERICS_TRAMPOLINE, NULL)); g_assert (code - buf <= tramp_size); @@ -578,7 +578,7 @@ mono_arch_get_static_rgctx_trampoline (gpointer arg, g_assert ((code - start) < buf_len); mono_arch_flush_icache (start, code - start); - mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_HELPER, NULL); + MONO_PROFILER_RAISE (jit_code_buffer, (start, code - start, MONO_PROFILER_CODE_BUFFER_HELPER, NULL)); mono_tramp_info_register (mono_tramp_info_create (NULL, start, code - start, NULL, NULL), domain); @@ -586,64 +586,3 @@ mono_arch_get_static_rgctx_trampoline (gpointer arg, } /*========================= End of Function ========================*/ - -/*------------------------------------------------------------------*/ -/* */ -/* Name - handler_block_trampoline_helper */ -/* */ -/* 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 - */ -/* */ -/*------------------------------------------------------------------*/ - -gpointer -mono_arch_create_handler_block_trampoline (MonoTrampInfo **info, gboolean aot) -{ - 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_code_buffer_new (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; -} - -/*========================= End of Function ========================*/