Author: zoltan
Date: 2006-09-19 04:19:38 -0400 (Tue, 19 Sep 2006)
New Revision: 65624

Modified:
   trunk/mono/mono/mini/ChangeLog
   trunk/mono/mono/mini/mini-amd64.c
Log:
2006-09-19  Zoltan Varga  <[EMAIL PROTECTED]>

        * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
        mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.


Modified: trunk/mono/mono/mini/ChangeLog
===================================================================
--- trunk/mono/mono/mini/ChangeLog      2006-09-19 06:57:36 UTC (rev 65623)
+++ trunk/mono/mono/mini/ChangeLog      2006-09-19 08:19:38 UTC (rev 65624)
@@ -1,3 +1,8 @@
+2006-09-19  Zoltan Varga  <[EMAIL PROTECTED]>
+
+       * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
+       mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
+
 2006-09-17  Zoltan Varga  <[EMAIL PROTECTED]>
 
        * aot-runtime.c (load_aot_module): Return immeditely if the AOT module 
was already

Modified: trunk/mono/mono/mini/mini-amd64.c
===================================================================
--- trunk/mono/mono/mini/mini-amd64.c   2006-09-19 06:57:36 UTC (rev 65623)
+++ trunk/mono/mono/mini/mini-amd64.c   2006-09-19 08:19:38 UTC (rev 65624)
@@ -1456,10 +1456,13 @@
 } while (0);
 
 static guint8*
-emit_call (MonoCompile *cfg, guint8 *code, guint32 patch_type, gconstpointer 
data)
+emit_call_body (MonoCompile *cfg, guint8 *code, guint32 patch_type, 
gconstpointer data)
 {
        mono_add_patch_info (cfg, code - cfg->native_code, patch_type, data);
 
+       /* 
+        * FIXME: Add support for thunks
+        */
        {
                gboolean near_call = FALSE;
 
@@ -1543,6 +1546,14 @@
        return code;
 }
 
+static inline guint8*
+emit_call (MonoCompile *cfg, guint8 *code, guint32 patch_type, gconstpointer 
data)
+{
+       mono_add_patch_info (cfg, code - cfg->native_code, patch_type, data);
+
+       return emit_call_body (cfg, code, patch_type, data);
+}
+
 /* FIXME: Add more instructions */
 #define INST_IGNORES_CFLAGS(ins) (((ins)->opcode == CEE_BR) || ((ins)->opcode 
== OP_STORE_MEMBASE_IMM) || ((ins)->opcode == OP_STOREI8_MEMBASE_REG) || 
((ins)->opcode == OP_MOVE) || ((ins)->opcode == OP_ICONST) || ((ins)->opcode == 
OP_I8CONST) || ((ins)->opcode == OP_LOAD_MEMBASE))
 
@@ -4532,12 +4543,7 @@
                                patch_info->type = 
MONO_PATCH_INFO_INTERNAL_METHOD;
                                patch_info->ip.i = code - cfg->native_code;
 
-                               if (cfg->compile_aot) {
-                                       amd64_call_code (code, 0);
-                               } else {
-                                       /* The callee is in memory allocated 
using the code manager */
-                                       amd64_call_code (code, 0);
-                               }
+                               code = emit_call_body (cfg, code, 
patch_info->type, patch_info->data.name);
 
                                amd64_mov_reg_imm (buf, AMD64_RSI, (code - 
cfg->native_code) - throw_ip);
                                while (buf < buf2)

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to