2009-09-06 Zoltan Varga <vargaz@gmail.com>
authorZoltan Varga <vargaz@gmail.com>
Sat, 5 Sep 2009 23:48:59 +0000 (23:48 -0000)
committerZoltan Varga <vargaz@gmail.com>
Sat, 5 Sep 2009 23:48:59 +0000 (23:48 -0000)
* tramp-x86.c (mono_arch_create_trampoline_code): Align the stack
when calling mono_thread_force_interruption_checkpoint ().

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

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

index 83421d851af23f86306b261206f3a2d2b739b1f8..c9b3e81604928e7673011551f66200fea961a595 100644 (file)
@@ -1,5 +1,8 @@
 2009-09-06  Zoltan Varga  <vargaz@gmail.com>
 
+       * tramp-x86.c (mono_arch_create_trampoline_code): Align the stack
+       when calling mono_thread_force_interruption_checkpoint ().
+
        * mini.c (mini_method_compile): Disable llvm when AOT compiling.
 
        * tramp-amd64.c (mono_arch_patch_callsite): Add support for 32 bit ->
index 0ff20a1860ee875b6ad7f00a3417b43d88a85a96..cb8d77928cec15e4091d2ff5cef84a853173e8b3 100644 (file)
@@ -333,9 +333,12 @@ mono_arch_create_trampoline_code (MonoTrampolineType tramp_type)
 
        /* Check for thread interruption */
        /* This is not perf critical code so no need to check the interrupt flag */
+       /* Align the stack on osx */
+       x86_alu_reg_imm (buf, X86_SUB, X86_ESP, 3 * 4);
        x86_push_reg (buf, X86_EAX);
        x86_call_code (buf, (guint8*)mono_thread_force_interruption_checkpoint);
        x86_pop_reg (buf, X86_EAX);
+       x86_alu_reg_imm (buf, X86_ADD, X86_ESP, 3 * 4);
 
        /* Restore LMF */