#include "mini.h"
#include "mini-ia64.h"
-#define NOT_IMPLEMENTED g_assert_not_reached ()
-
#define GP_SCRATCH_REG 31
#define GP_SCRATCH_REG2 30
/*
* mono_arch_get_unbox_trampoline:
+ * @gsctx: the generic sharing context
* @m: method pointer
* @addr: pointer to native code for @m
*
* 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;
/* 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);
}
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);
g_assert_not_reached ();
}
-void
-mono_arch_patch_delegate_trampoline (guint8 *code, guint8 *tramp, gssize *regs, guint8 *addr)
-{
- /*
- * This is called by the code generated by OP_CALL_REG:
- * ld8 r30=[r8],8
- * nop.i 0x0;;
- * mov.sptk b6=r30
- * ld8 r1=[r8]
- * br.call.sptk.few b0=b6
- */
-
- /* We patch the function descriptor instead of delegate->method_ptr */
- //g_assert (((gpointer*)(regs [8] - 8))[0] == tramp);
- ((gpointer*)(regs [8] - 8))[0] = mono_get_addr_from_ftnptr (addr);
- ((gpointer*)(regs [8] - 8))[1] = NULL;
-}
-
guchar*
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);
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 */
}
gpointer
-mono_debugger_create_notification_function (void)
+mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 encoded_offset)
{
- NOT_IMPLEMENTED;
-
+ /* FIXME: implement! */
+ g_assert_not_reached ();
return NULL;
}