Author: Armin Rigo <ar...@tunes.org>
Branch: 
Changeset: r76266:df8de9ee47b5
Date: 2015-03-07 09:31 +0100
http://bitbucket.org/pypy/pypy/changeset/df8de9ee47b5/

Log:    More missing stack alignment

diff --git a/rpython/translator/c/src/stacklet/switch_x86_64_gcc.h 
b/rpython/translator/c/src/stacklet/switch_x86_64_gcc.h
--- a/rpython/translator/c/src/stacklet/switch_x86_64_gcc.h
+++ b/rpython/translator/c/src/stacklet/switch_x86_64_gcc.h
@@ -10,7 +10,10 @@
      "pushq %%r12\n"
      "pushq %%r13\n"
      "pushq %%r14\n"
+     "movq %%rsp, %%rbp\n"
+     "andq $-16, %%rsp\n"   /* <= align the stack here... */
      "pushq %%r15\n"
+     "pushq %%rbp\n"       /* ...so that rsp is now a multiple of 16 */
 
      "movq %%rax, %%r12\n" /* save 'restore_state' for later */
      "movq %%rsi, %%r13\n" /* save 'extra' for later         */
@@ -34,7 +37,9 @@
      /* The stack's content is now restored. */
 
      "0:\n"
+     "popq %%rbp\n"
      "popq %%r15\n"
+     "movq %%rbp, %%rsp\n"
      "popq %%r14\n"
      "popq %%r13\n"
      "popq %%r12\n"
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to