MonoDomain *domain = mono_domain_get ();
start = addr;
- if ((!mono_method_signature (method)->ret->byref) &&
- (MONO_TYPE_ISSTRUCT (mono_method_signature (method)->ret)))
+ if (MONO_TYPE_ISSTRUCT (mono_method_signature (method)->ret))
this_pos = s390_r3;
- mono_domain_lock (domain);
- start = code = mono_code_manager_reserve (domain->code_mp, 28);
- mono_domain_unlock (domain);
+ start = code = mono_domain_code_reserve (domain, 28);
s390_basr (code, s390_r13, 0);
s390_j (code, 4);
/*------------------------------------------------------------------*/
void
-mono_arch_patch_callsite (guint8 *orig_code, guint8 *addr)
+mono_arch_patch_callsite (guint8 *method_start, guint8 *orig_code, guint8 *addr)
{
gint32 displace;
unsigned short opcode;
/*========================= End of Function ========================*/
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)
{
char patch[6] = {0x47, 0x00, 0x00, 0x00, 0x07, 0x00};
/*========================= End of Function ========================*/
void
-mono_arch_nullify_plt_entry (guint8 *code)
+mono_arch_nullify_plt_entry (guint8 *code, mgreg_t *regs)
{
g_assert_not_reached ();
}
/*------------------------------------------------------------------*/
gpointer
-mono_arch_get_vcall_slot (guint8 *code, gpointer *regs, int *displacement)
+mono_arch_get_vcall_slot (guint8 *code, mgreg_t *regs, int *displacement)
{
int reg;
guchar* base;
CREATE_GR_OFFSET +
sizeof(int)*(reg-2)));
return base;
+ case 0x581d :
+ /* l %r1,OFFSET(%r13,%r7) */
+ code -= 4;
+ reg = *code >> 4;
+ *displacement = *((short *)code) & 0x0fff;
+ if (reg > 5)
+ base = *((guchar **) (sp + S390_REG_SAVE_OFFSET+
+ sizeof(int)*(reg-6)));
+ else
+ base = *((guchar **) ((sp - CREATE_STACK_SIZE) +
+ CREATE_GR_OFFSET +
+ sizeof(int)*(reg-2)));
+ base += *((guint32*) (sp + S390_REG_SAVE_OFFSET+
+ sizeof(int)*(s390_r13-6)));
+ return base;
case 0xc0e5 :
/* This is the 'brasl' instruction */
return NULL;
/*========================= End of Function ========================*/
-gpointer*
-mono_arch_get_vcall_slot_addr (guint8* code, gpointer *regs)
-{
- gpointer vt;
- int displacement;
- vt = mono_arch_get_vcall_slot (code, regs, &displacement);
- if (!vt)
- return NULL;
- return (gpointer*)((char*)vt + displacement);
-}
-
-/*========================= End of Function ========================*/
-
/*------------------------------------------------------------------*/
/* */
/* Name - mono_arch_create_trampoline_code */
/*------------------------------------------------------------------*/
guchar*
-mono_arch_create_trampoline_code (MonoTrampolineType tramp_type)
+mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInfo **info, gboolean aot)
{
-
guint8 *buf, *tramp, *code;
int i, offset, lmfOffset;
+ g_assert (!aot);
+ if (info)
+ *info = NULL;
+
/* Now we'll create in 'buf' the S/390 trampoline code. This
is the trampoline code common to all methods */
/* Set arguments */
- /* Arg 1: gssize *regs. We pass sp instead */
+ /* Arg 1: mgreg_t *regs. We pass sp instead */
s390_lr (buf, s390_r2, STK_BASE);
s390_ahi (buf, s390_r2, CREATE_STACK_SIZE);
/* purpose is to provide the generic part with the */
/* MonoMethod *method pointer. We'll use r1 to keep it. */
/*----------------------------------------------------------*/
- mono_domain_lock (domain);
- code = buf = mono_code_manager_reserve (domain->code_mp, SPECIFIC_TRAMPOLINE_SIZE);
- mono_domain_unlock (domain);
+ code = buf = mono_domain_code_reserve (domain, SPECIFIC_TRAMPOLINE_SIZE);
s390_basr (buf, s390_r1, 0);
s390_j (buf, 4);
/*========================= End of Function ========================*/
-/*------------------------------------------------------------------*/
-/* */
-/* Name - mono_debuger_create_notification_function */
-/* */
-/* Function - This method is only called when running in the */
-/* Mono debugger. It returns a pointer to the */
-/* arch specific notification function. */
-/* */
-/*------------------------------------------------------------------*/
-
gpointer
-mono_debugger_create_notification_function (void)
+mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info, gboolean aot)
{
- guint8 *ptr, *buf;
-
- ptr = buf = mono_global_codeman_reserve (16);
- s390_break (buf);
- s390_br (buf, s390_r14);
-
- return ptr;
+ /* FIXME: implement! */
+ g_assert_not_reached ();
+ return NULL;
}
-
-/*========================= End of Function ========================*/