[runtime] Added helper methods to iterate MonoInst with filters.
[mono.git] / mono / mini / tramp-ia64.c
index e255a83e1da808cc572f86c03ca61a321b96caad..8024cc0ca085cc8f31167ce48a92f9d5b189a6e3 100644 (file)
@@ -43,15 +43,10 @@ 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))
-               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);
@@ -76,7 +71,7 @@ mono_arch_get_unbox_trampoline (MonoMethod *m, gpointer addr)
 }
 
 void
-mono_arch_patch_callsite (guint8 *code, guint8 *addr)
+mono_arch_patch_callsite (guint8 *method_start, guint8 *code, guint8 *addr)
 {
        guint8 *callsite_begin;
        guint64 *callsite = (guint64*)(gpointer)(code - 16);
@@ -123,13 +118,13 @@ mono_arch_patch_callsite (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);
@@ -174,14 +169,8 @@ mono_arch_nullify_class_init_trampoline (guint8 *code, gssize *regs)
        mono_arch_flush_icache (callsite_begin, code - callsite_begin);
 }
 
-void
-mono_arch_nullify_plt_entry (guint8 *code)
-{
-       g_assert_not_reached ();
-}
-
 guchar*
-mono_arch_create_trampoline_code (MonoTrampolineType tramp_type)
+mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInfo **info, gboolean aot)
 {
        guint8 *buf, *tramp;
        int i, offset, saved_regs_offset, saved_fpregs_offset, last_offset, framesize;
@@ -191,6 +180,10 @@ mono_arch_create_trampoline_code (MonoTrampolineType tramp_type)
        unw_dyn_info_t *di;
        unw_dyn_region_info_t *r_pro;
 
+       g_assert (!aot);
+       if (info)
+               *info = NULL;
+
        /* 
         * Since jump trampolines are not patched, this trampoline is executed every
         * time a call is made to a jump trampoline. So we try to keep things faster
@@ -308,7 +301,7 @@ mono_arch_create_trampoline_code (MonoTrampolineType tramp_type)
        /* This is not perf critical code so no need to check the interrupt flag */
        ia64_mov (code, l2, IA64_R8);
 
-       tramp = (guint8*)mono_thread_interruption_checkpoint;
+       tramp = (guint8*)mono_thread_force_interruption_checkpoint;
        ia64_movl (code, l0, tramp);
        ia64_ld8_inc_imm (code, l1, l0, 8);
        ia64_mov_to_br (code, IA64_B6, l1);
@@ -375,9 +368,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 */
 
@@ -415,9 +406,9 @@ mono_arch_invalidate_method (MonoJitInfo *ji, void *func, gpointer func_arg)
 }
 
 gpointer
-mono_debugger_create_notification_function (void)
+mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info, gboolean aot)
 {
-       NOT_IMPLEMENTED;
-
+       /* FIXME: implement! */
+       g_assert_not_reached ();
        return NULL;
 }