Fix a typo.
[mono.git] / mono / mini / exceptions-x86.c
index 3fd3f117dac7e1f6f918ad71741dbf0f7de2af33..dc2cbb3f4452f1af4522cfb5a4ba71e56cd38b05 100644 (file)
@@ -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)
@@ -872,7 +872,7 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
                                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
@@ -1178,6 +1178,9 @@ mono_tasklets_arch_restore (void)
        /* the signature is: restore (MonoContinuation *cont, int state, MonoLMF **lmf_addr) */
        /* put cont in edx */
        x86_mov_reg_membase (code, X86_EDX, X86_ESP, 4, 4);
+        /* state in eax, so it's setup as the return value */
+        x86_mov_reg_membase (code, X86_EAX, X86_ESP, 8, 4);
+
        /* setup the copy of the stack */
        x86_mov_reg_membase (code, X86_ECX, X86_EDX, G_STRUCT_OFFSET (MonoContinuation, stack_used_size), 4);
        x86_shift_reg_imm (code, X86_SHR, X86_ECX, 2);
@@ -1198,8 +1201,6 @@ mono_tasklets_arch_restore (void)
        /*x86_mov_reg_membase (code, X86_ECX, X86_ESP, 12, 4);
        x86_mov_membase_reg (code, X86_ECX, 0, X86_EDX, 4);*/
 
-       /* state in eax, so it's setup as the return value */
-       x86_mov_reg_membase (code, X86_EAX, X86_ESP, 8, 4);
        x86_jump_membase (code, X86_EDX, G_STRUCT_OFFSET (MonoContinuation, return_ip));
        g_assert ((code - start) <= 48);
        saved = start;