Author: Armin Rigo <[email protected]>
Branch:
Changeset: r76267:1fdade0f6b61
Date: 2015-03-07 09:37 +0100
http://bitbucket.org/pypy/pypy/changeset/1fdade0f6b61/
Log: Copy the stack alignment logic here too
diff --git a/rpython/translator/c/src/stacklet/switch_x86_gcc.h
b/rpython/translator/c/src/stacklet/switch_x86_gcc.h
--- a/rpython/translator/c/src/stacklet/switch_x86_gcc.h
+++ b/rpython/translator/c/src/stacklet/switch_x86_gcc.h
@@ -8,7 +8,10 @@
"pushl %%ebp\n"
"pushl %%ebx\n" /* push some registers that may contain */
"pushl %%esi\n" /* some value that is meant to be saved */
+ "movl %%esp, %%ebp\n"
+ "andl $-16, %%esp\n" /* <= align the stack here, for the calls */
"pushl %%edi\n"
+ "pushl %%ebp\n"
"movl %%eax, %%esi\n" /* save 'restore_state' for later */
"movl %%edx, %%edi\n" /* save 'extra' for later */
@@ -35,7 +38,9 @@
"0:\n"
"addl $8, %%esp\n"
+ "popl %%ebp\n"
"popl %%edi\n"
+ "movl %%ebp, %%esp\n"
"popl %%esi\n"
"popl %%ebx\n"
"popl %%ebp\n"
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit