2009-08-31 Zoltan Varga <vargaz@gmail.com>
authorZoltan Varga <vargaz@gmail.com>
Mon, 31 Aug 2009 20:56:59 +0000 (20:56 -0000)
committerZoltan Varga <vargaz@gmail.com>
Mon, 31 Aug 2009 20:56:59 +0000 (20:56 -0000)
* exceptions-x86.c (get_throw_exception): Align the stack on osx.

svn path=/trunk/mono/; revision=140989

mono/mini/ChangeLog
mono/mini/exceptions-x86.c

index 82aea0ccf874f7584729f669d4cb9952c0d3d429..bf32a26da5eefddabcc2a7f28dfa1b89496f2143 100644 (file)
@@ -1,3 +1,7 @@
+2009-08-31  Zoltan Varga  <vargaz@gmail.com>
+
+       * exceptions-x86.c (get_throw_exception): Align the stack on osx.
+
 2009-08-28  Zoltan Varga  <vargaz@gmail.com>
 
        * mini-llvm-cpp.cpp mini-llvm.c: Update to latest llvm api.
index f2d5eee568f9facc2bdf54308bd57c3fb9008ae0..8b084386ad770d86d68e7554271f64474697cd8c 100644 (file)
@@ -424,9 +424,11 @@ get_throw_exception (gboolean rethrow)
 
        start = code = mono_global_codeman_reserve (64);
 
+       /* Align the stack on apple, since we push 10 args + the return address */
+       x86_alu_reg_imm (code, X86_SUB, X86_ESP, 4);
        x86_push_reg (code, X86_ESP);
-       x86_push_membase (code, X86_ESP, 4); /* IP */
-       x86_push_membase (code, X86_ESP, 12); /* exception */
+       x86_push_membase (code, X86_ESP, 8); /* IP */
+       x86_push_membase (code, X86_ESP, 16); /* exception */
        x86_push_reg (code, X86_EBP);
        x86_push_reg (code, X86_EDI);
        x86_push_reg (code, X86_ESI);