align stack before re-entering engine to make sse work (#4051)

This commit is contained in:
Ludwig Nussel 2009-05-02 17:15:51 +00:00
parent 697c2e42a5
commit 84fbc2252f
1 changed files with 5 additions and 0 deletions

View File

@ -214,6 +214,9 @@ __asm__(
"ret\n"
"0:\n\t" // system call
"notl %eax\n\t"
"pushl %ebp\n\t"
"movl %esp, %ebp\n\t"
"andl $-16, %esp\n\t" // align the stack so engine can use sse
"pushl %ecx\n\t"
"pushl %edi\n\t" // opStack
"pushl %esi\n\t" // programStack
@ -221,6 +224,8 @@ __asm__(
"call " CMANG(CallAsmCall) "\n\t"
"addl $12, %esp\n\t"
"popl %ecx\n\t"
"movl %ebp, %esp\n\t"
"popl %ebp\n\t"
"addl $4, %edi\n\t"
"ret\n\t"
#if defined __ELF__