mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 15:21:35 +00:00
align stack before re-entering engine to make sse work (#4051)
This commit is contained in:
parent
697c2e42a5
commit
84fbc2252f
1 changed files with 5 additions and 0 deletions
|
@ -214,6 +214,9 @@ __asm__(
|
||||||
"ret\n"
|
"ret\n"
|
||||||
"0:\n\t" // system call
|
"0:\n\t" // system call
|
||||||
"notl %eax\n\t"
|
"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 %ecx\n\t"
|
||||||
"pushl %edi\n\t" // opStack
|
"pushl %edi\n\t" // opStack
|
||||||
"pushl %esi\n\t" // programStack
|
"pushl %esi\n\t" // programStack
|
||||||
|
@ -221,6 +224,8 @@ __asm__(
|
||||||
"call " CMANG(CallAsmCall) "\n\t"
|
"call " CMANG(CallAsmCall) "\n\t"
|
||||||
"addl $12, %esp\n\t"
|
"addl $12, %esp\n\t"
|
||||||
"popl %ecx\n\t"
|
"popl %ecx\n\t"
|
||||||
|
"movl %ebp, %esp\n\t"
|
||||||
|
"popl %ebp\n\t"
|
||||||
"addl $4, %edi\n\t"
|
"addl $4, %edi\n\t"
|
||||||
"ret\n\t"
|
"ret\n\t"
|
||||||
#if defined __ELF__
|
#if defined __ELF__
|
||||||
|
|
Loading…
Reference in a new issue