Implement passing of this as the first argument for ia64 correctly.
[mono.git] / mono / mini / tramp-ppc.c
index 6d30d3a89c7b0d3b9af357c79cc0f3811381e4fc..2972348d09ed7103f088f375cf8c8618d5d23fe3 100644 (file)
@@ -63,7 +63,6 @@ branch_for_target_reachable (guint8 *branch, guint8 *target)
 
 /*
  * get_unbox_trampoline:
- * @gsctx: the generic sharing context
  * @m: method pointer
  * @addr: pointer to native code for @m
  *
@@ -72,7 +71,7 @@ branch_for_target_reachable (guint8 *branch, guint8 *target)
  * unboxing before calling the method
  */
 gpointer
-mono_arch_get_unbox_trampoline (MonoGenericSharingContext *gsctx, MonoMethod *m, gpointer addr)
+mono_arch_get_unbox_trampoline (MonoMethod *m, gpointer addr)
 {
        guint8 *code, *start;
        int this_pos = 3;
@@ -82,9 +81,6 @@ mono_arch_get_unbox_trampoline (MonoGenericSharingContext *gsctx, MonoMethod *m,
 
        addr = mono_get_addr_from_ftnptr (addr);
 
-       if (MONO_TYPE_ISSTRUCT (mono_method_signature (m)->ret))
-               this_pos = 4;
-           
        mono_domain_lock (domain);
        start = code = mono_domain_code_reserve (domain, size);
        code = mono_ppc_create_pre_code_ftnptr (code);
@@ -450,7 +446,7 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
        }
 
        if (info)
-               *info = mono_tramp_info_create (g_strdup_printf ("generic_trampoline_%d", tramp_type), buf, code - buf, ji, unwind_ops);
+               *info = mono_tramp_info_create (mono_get_generic_trampoline_name (tramp_type), buf, code - buf, ji, unwind_ops);
 
        return buf;
 }
@@ -622,7 +618,7 @@ mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info
        g_assert (code - buf <= tramp_size);
 
        if (info)
-               *info = mono_tramp_info_create (g_strdup_printf ("rgctx_fetch_trampoline_%u", slot), buf, code - buf, ji, unwind_ops);
+               *info = mono_tramp_info_create (mono_get_rgctx_fetch_trampoline_name (slot), buf, code - buf, ji, unwind_ops);
 
        return buf;
 #else