Author: zoltan
Date: 2005-04-28 09:44:08 -0400 (Thu, 28 Apr 2005)
New Revision: 43723
Modified:
trunk/mono/mono/mini/ChangeLog
trunk/mono/mono/mini/mini-amd64.c
Log:
2005-04-28 Zoltan Varga <[EMAIL PROTECTED]>
* mini-amd64.c (emit_call): Fix calls to native functions when the
runtime is compiled as a shared library. Fixes #74756.
Modified: trunk/mono/mono/mini/ChangeLog
===================================================================
--- trunk/mono/mono/mini/ChangeLog 2005-04-28 13:42:22 UTC (rev 43722)
+++ trunk/mono/mono/mini/ChangeLog 2005-04-28 13:44:08 UTC (rev 43723)
@@ -1,5 +1,8 @@
2005-04-28 Zoltan Varga <[EMAIL PROTECTED]>
+ * mini-amd64.c (emit_call): Fix calls to native functions when the
+ runtime is compiled as a shared library. Fixes #74756.
+
* mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
on a literal field. Fixes #74751.
Modified: trunk/mono/mono/mini/mini-amd64.c
===================================================================
--- trunk/mono/mono/mini/mini-amd64.c 2005-04-28 13:42:22 UTC (rev 43722)
+++ trunk/mono/mono/mini/mini-amd64.c 2005-04-28 13:44:08 UTC (rev 43723)
@@ -1285,6 +1285,19 @@
/* The callee might be an AOT method */
near_call = FALSE;
}
+
+ if (patch_type == MONO_PATCH_INFO_INTERNAL_METHOD) {
+ /*
+ * The call might go directly to a native
function without
+ * the wrapper.
+ */
+ MonoJitICallInfo *mi =
mono_find_jit_icall_by_name (data);
+ if (mi) {
+ gconstpointer target =
mono_icall_get_wrapper (mi);
+ if ((((guint64)target) >> 32) != 0)
+ near_call = FALSE;
+ }
+ }
}
else {
if (mono_find_class_init_trampoline_by_addr (data))
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches