Merge pull request #487 from mayerwin/patch-1
[mono.git] / mono / mini / exceptions-x86.c
index d0adec98f0d26e16cc06c667142727ea0cd86d46..a8c8c0f2bd4c94c129c7645923f4a0668af3a874 100644 (file)
@@ -627,7 +627,7 @@ get_throw_trampoline (const char *name, gboolean rethrow, gboolean llvm, gboolea
                code = mono_arch_emit_load_aotconst (start, code, &ji, MONO_PATCH_INFO_JIT_ICALL_ADDR, corlib ? "mono_x86_throw_corlib_exception" : "mono_x86_throw_exception");
                x86_call_reg (code, X86_EAX);
        } else {
-               x86_call_code (code, resume_unwind ? (mono_x86_resume_unwind) : (corlib ? (gpointer)mono_x86_throw_corlib_exception : (gpointer)mono_x86_throw_exception));
+               x86_call_code (code, resume_unwind ? (gpointer)(mono_x86_resume_unwind) : (corlib ? (gpointer)mono_x86_throw_corlib_exception : (gpointer)mono_x86_throw_exception));
        }
        x86_breakpoint (code);
 
@@ -809,7 +809,7 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
                /* Pop arguments off the stack */
                /* 
                 * FIXME: LLVM doesn't push these, we can't use ji->from_llvm as it describes
-                * the caller.
+                * the callee.
                 */
 #ifndef ENABLE_LLVM
                if (ji->has_arch_eh_info)
@@ -867,14 +867,16 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
                        /* Pop arguments off the stack */
                        /* FIXME: Handle the delegate case too ((*lmf)->method == NULL) */
                        /* FIXME: Handle the IMT/vtable case too */
+#if 0
 #ifndef ENABLE_LLVM
                        if ((*lmf)->method) {
                                MonoMethod *method = (*lmf)->method;
                                MonoJitArgumentInfo *arg_info = g_newa (MonoJitArgumentInfo, mono_method_signature (method)->param_count + 1);
 
-                               guint32 stack_to_pop = mono_arch_get_argument_info (mono_method_signature (method), mono_method_signature (method)->param_count, arg_info);
+                               guint32 stack_to_pop = mono_arch_get_argument_info (NULL, mono_method_signature (method), mono_method_signature (method)->param_count, arg_info);
                                new_ctx->esp += stack_to_pop;
                        }
+#endif
 #endif
                }
                else