* HttpRuntime.cs: Avoid ANE on Windows when HttpRuntime is used
[mono.git] / mono / mini / tramp-ia64.c
index cd15a63aa4fc2111c75a6ce0323a7032a50d9ed5..db0bf5d61e46e69eac8e237951897285d6b667cd 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);
@@ -308,7 +307,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 +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;
-}