Author: zoltan
Date: 2005-02-27 12:43:38 -0500 (Sun, 27 Feb 2005)
New Revision: 41261
Modified:
trunk/mono/mono/mini/ChangeLog
trunk/mono/mono/mini/mini-amd64.c
trunk/mono/mono/mini/mini-amd64.h
trunk/mono/mono/mini/mini.h
trunk/mono/mono/mini/tramp-amd64.c
Log:
2005-02-27 Zoltan Varga <[EMAIL PROTECTED]>
* mini-amd64.h mini.h mini-amd64.c tramp-amd64.c
(mono_amd64_get_vcall_slot_addr):
Rename this to mono_arch....
(mono_amd64_get_delegate_method_ptr_addr): Ditto.
Modified: trunk/mono/mono/mini/ChangeLog
===================================================================
--- trunk/mono/mono/mini/ChangeLog 2005-02-27 15:06:10 UTC (rev 41260)
+++ trunk/mono/mono/mini/ChangeLog 2005-02-27 17:43:38 UTC (rev 41261)
@@ -1,5 +1,9 @@
2005-02-27 Zoltan Varga <[EMAIL PROTECTED]>
+ * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c
(mono_amd64_get_vcall_slot_addr):
+ Rename this to mono_arch....
+ (mono_amd64_get_delegate_method_ptr_addr): Ditto.
+
* mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper
function.
* mini-amd64.c (emit_call): If both the caller and the callee is
Modified: trunk/mono/mono/mini/mini-amd64.c
===================================================================
--- trunk/mono/mono/mini/mini-amd64.c 2005-02-27 15:06:10 UTC (rev 41260)
+++ trunk/mono/mono/mini/mini-amd64.c 2005-02-27 17:43:38 UTC (rev 41261)
@@ -5588,7 +5588,7 @@
}
gpointer*
-mono_amd64_get_vcall_slot_addr (guint8* code, guint64 *regs)
+mono_arch_get_vcall_slot_addr (guint8* code, gpointer *regs)
{
guint32 reg;
guint32 disp;
@@ -5649,11 +5649,11 @@
/* R11 is clobbered by the trampoline code */
g_assert (reg != AMD64_R11);
- return (gpointer)((regs [reg]) + disp);
+ return (gpointer)(((guint64)(regs [reg])) + disp);
}
gpointer*
-mono_amd64_get_delegate_method_ptr_addr (guint8* code, guint64 *regs)
+mono_arch_get_delegate_method_ptr_addr (guint8* code, gpointer *regs)
{
guint32 reg;
guint32 disp;
@@ -5668,7 +5668,7 @@
if (reg == AMD64_RAX)
return NULL;
else
- return (gpointer*)(regs [reg] + disp);
+ return (gpointer*)(((guint64)(regs [reg])) + disp);
}
return NULL;
Modified: trunk/mono/mono/mini/mini-amd64.h
===================================================================
--- trunk/mono/mono/mini/mini-amd64.h 2005-02-27 15:06:10 UTC (rev 41260)
+++ trunk/mono/mono/mini/mini-amd64.h 2005-02-27 17:43:38 UTC (rev 41261)
@@ -223,12 +223,6 @@
#define MONO_ARCH_HAVE_CREATE_TRAMPOLINE_FROM_TOKEN 1
#define MONO_ARCH_HAVE_CREATE_VARS 1
-gpointer*
-mono_amd64_get_vcall_slot_addr (guint8* code, guint64 *regs);
-
-gpointer*
-mono_amd64_get_delegate_method_ptr_addr (guint8* code, guint64 *regs);
-
void
mono_amd64_exceptions_init (void);
Modified: trunk/mono/mono/mini/mini.h
===================================================================
--- trunk/mono/mono/mini/mini.h 2005-02-27 15:06:10 UTC (rev 41260)
+++ trunk/mono/mono/mini/mini.h 2005-02-27 17:43:38 UTC (rev 41261)
@@ -871,6 +871,8 @@
gboolean mono_arch_is_int_overflow (void *sigctx, void *info);
void mono_arch_invalidate_method (MonoJitInfo *ji, void *func,
gpointer func_arg);
guint32 mono_arch_get_patch_offset (guint8 *code);
+gpointer*mono_arch_get_vcall_slot_addr (guint8* code, gpointer *regs);
+gpointer*mono_arch_get_delegate_method_ptr_addr (guint8* code, gpointer *regs);
void mono_arch_create_vars (MonoCompile *cfg);
/* Exception handling */
Modified: trunk/mono/mono/mini/tramp-amd64.c
===================================================================
--- trunk/mono/mono/mini/tramp-amd64.c 2005-02-27 15:06:10 UTC (rev 41260)
+++ trunk/mono/mono/mini/tramp-amd64.c 2005-02-27 17:43:38 UTC (rev 41261)
@@ -88,7 +88,7 @@
if (!code)
return addr;
- vtable_slot = mono_amd64_get_vcall_slot_addr (code, regs);
+ vtable_slot = mono_arch_get_vcall_slot_addr (code, regs);
if (vtable_slot) {
if (m->klass->valuetype)
@@ -131,7 +131,7 @@
InterlockedExchangePointer (got_entry, addr);
}
}
- else if ((method_ptr = mono_amd64_get_delegate_method_ptr_addr
(code, regs))) {
+ else if ((method_ptr = mono_arch_get_delegate_method_ptr_addr
(code, regs))) {
/* This is a call inside a delegate wrapper to the
target method */
MonoJitInfo *ji =
mono_jit_info_table_find (mono_domain_get (),
code);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches