Contributed under the terms of the MIT/X11 license by
[mono.git] / mono / mini / tramp-ia64.c
index d057a14eea944584255f21495e5acb92814865ad..4a9970ff42e05b08f811cfcba702770d56acd0d4 100644 (file)
@@ -24,6 +24,7 @@
 
 /*
  * mono_arch_get_unbox_trampoline:
+ * @gsctx: the generic sharing context
  * @m: method pointer
  * @addr: pointer to native code for @m
  *
@@ -32,7 +33,7 @@
  * unboxing before calling the method
  */
 gpointer
-mono_arch_get_unbox_trampoline (MonoMethod *m, gpointer addr)
+mono_arch_get_unbox_trampoline (MonoGenericSharingContext *gsctx, MonoMethod *m, gpointer addr)
 {
        guint8 *buf;
        gpointer func_addr, func_gp;
@@ -43,15 +44,13 @@ mono_arch_get_unbox_trampoline (MonoMethod *m, gpointer addr)
 
        /* FIXME: Optimize this */
 
-       if (!mono_method_signature (m)->ret->byref && MONO_TYPE_ISSTRUCT (mono_method_signature (m)->ret))
+       if (MONO_TYPE_ISSTRUCT (mono_method_signature (m)->ret))
                this_reg = 1;
 
        func_addr = ((gpointer*)addr) [0];
        func_gp = ((gpointer*)addr) [1];
 
-       mono_domain_lock (domain);
-       buf = mono_code_manager_reserve (domain->code_mp, 256);
-       mono_domain_unlock (domain);
+       buf = mono_domain_code_reserve (domain, 256);
 
        /* Since the this reg is a stacked register, its a bit hard to access it */
        ia64_codegen_init (code, buf);
@@ -123,13 +122,13 @@ mono_arch_patch_callsite (guint8 *method_start, guint8 *code, guint8 *addr)
 }
 
 void
-mono_arch_patch_plt_entry (guint8 *code, guint8 *addr)
+mono_arch_patch_plt_entry (guint8 *code, gpointer *got, mgreg_t *regs, guint8 *addr)
 {
        g_assert_not_reached ();
 }
 
 void
-mono_arch_nullify_class_init_trampoline (guint8 *code, gssize *regs)
+mono_arch_nullify_class_init_trampoline (guint8 *code, mgreg_t *regs)
 {
        guint8 *callsite_begin;
        guint64 *callsite = (guint64*)(gpointer)(code - 16);
@@ -175,7 +174,7 @@ mono_arch_nullify_class_init_trampoline (guint8 *code, gssize *regs)
 }
 
 void
-mono_arch_nullify_plt_entry (guint8 *code)
+mono_arch_nullify_plt_entry (guint8 *code, mgreg_t *regs)
 {
        g_assert_not_reached ();
 }
@@ -375,9 +374,7 @@ mono_arch_create_specific_trampoline (gpointer arg1, MonoTrampolineType tramp_ty
 
        tramp = mono_get_trampoline_code (tramp_type);
 
-       mono_domain_lock (domain);
-       buf = mono_code_manager_reserve (domain->code_mp, TRAMPOLINE_SIZE);
-       mono_domain_unlock (domain);
+       buf = mono_domain_code_reserve (domain, TRAMPOLINE_SIZE);
 
        /* FIXME: Optimize this */
 
@@ -421,11 +418,3 @@ mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 encoded_offset)
        g_assert_not_reached ();
        return NULL;
 }
-
-guint32
-mono_arch_get_rgctx_lazy_fetch_offset (gpointer *regs)
-{
-       /* FIXME: implement! */
-       g_assert_not_reached ();
-       return 0;
-}