Make pdb2mdb work with files in other directories.
[mono.git] / mono / mini / tramp-alpha.c
index c88e960d6113918325b0135a4dbc5859afb6dc23..186d9bc08cbe791bed96028e04dcf2857ba3f0af 100644 (file)
@@ -472,14 +472,12 @@ mono_arch_create_specific_trampoline (gpointer arg1,
   alpha_jmp(code, alpha_zero, alpha_at, 0);
   
   g_assert (((char *)code - (char *)buf) <= TRAMPOLINE_SIZE);
-  mono_domain_lock (domain);
   /*
    * FIXME: Changing the size to code - buf causes strange crashes during
    * mcs bootstrap.
    */
-  real_code = mono_code_manager_reserve (domain->code_mp, TRAMPOLINE_SIZE);
+  real_code = mono_domain_code_reserve (domain, TRAMPOLINE_SIZE);
   size = (char *)code - (char *)buf;
-  mono_domain_unlock (domain);
   
   memcpy (real_code, buf, size);
  
@@ -499,7 +497,7 @@ mono_arch_create_specific_trampoline (gpointer arg1,
 /*========================= End of Function ========================*/
 
 void
-mono_arch_nullify_class_init_trampoline (guint8 *code, gssize *regs)
+mono_arch_nullify_class_init_trampoline (guint8 *code, mgreg_t *regs)
 {
   unsigned int *pcode = (unsigned int *)code;
 
@@ -523,7 +521,7 @@ mono_arch_nullify_class_init_trampoline (guint8 *code, gssize *regs)
 }
 
 void
-mono_arch_patch_callsite (guint8 *code, guint8 *addr)
+mono_arch_patch_callsite (guint8 *method_start, guint8 *code, guint8 *addr)
 {
   unsigned long *p = (unsigned int *)(code-12);
   
@@ -570,6 +568,7 @@ mono_arch_patch_callsite (guint8 *code, guint8 *addr)
 
 /*
  * mono_arch_get_unbox_trampoline:
+ * @gsctx: the generic sharing context
  * @m: method pointer
  * @addr: pointer to native code for @m
  *
@@ -578,7 +577,7 @@ mono_arch_patch_callsite (guint8 *code, guint8 *addr)
  * 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)
 {
   unsigned int *code, *start_code;
   int this_reg = 16; //R16
@@ -587,13 +586,10 @@ mono_arch_get_unbox_trampoline (MonoMethod *m, gpointer addr)
 
   ALPHA_DEBUG("mono_arch_get_unbox_trampoline");
 
-  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 = 17; //R17
 
-  mono_domain_lock (domain);
-  start_code = code = (unsigned int *)mono_code_manager_reserve (domain->code_mp, 32);
-  mono_domain_unlock (domain);
+  start_code = code = (unsigned int *)mono_domain_code_reserve (domain, 32);
 
   // Adjust this by size of MonoObject
   alpha_addq_(code, this_reg, sizeof(MonoObject), this_reg);  // 0
@@ -618,36 +614,21 @@ mono_arch_get_unbox_trampoline (MonoMethod *m, gpointer addr)
 }
 
 void
-mono_arch_nullify_plt_entry (guint8 *code)
+mono_arch_nullify_plt_entry (guint8 *code, mgreg_t *regs)
 {
         g_assert_not_reached ();
 }
 
 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 ();
 }
 
-/*
- * This method is only called when running in the Mono Debugger.
- */
 gpointer
-mono_debugger_create_notification_function (void)
+mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 encoded_offset)
 {
-  guint8 *code;
-  unsigned int *buf;
-
-  code = mono_global_codeman_reserve (16);
-  buf = (unsigned int *)code;
-
-  *buf = 0;
-
-  alpha_call_pal(buf, 0x80);
-  alpha_ret(buf, alpha_ra, 1);
-  //x86_breakpoint (buf);
-  //x86_ret (buf);
-
-  return code;
+       /* FIXME: implement! */
+       g_assert_not_reached ();
+       return NULL;
 }
-