Apply a second fix for stack alignment with libkse. This time, enter the

UTS with the stack correctly aligned.  Also, while here, use an indirect
jump rather than the pushq/ret hack.

This fixes threaded apps that use floating point for me, although
it hasn't solved all the problems.  It is an improvement though.
Preservation of the 128 byte red zone hasn't been resolved yet.

Approved by:  re (scottl)
This commit is contained in:
peter 2003-12-05 01:41:43 +00:00
parent 78cbf332e8
commit c64582f235
2 changed files with 4 additions and 4 deletions

View File

@ -35,7 +35,7 @@ __FBSDID("$FreeBSD$");
ENTRY(_amd64_enter_uts)
addq %rcx, %rdx /* get stack base */
andq $~0xf, %rdx /* align to 16 bytes */
subq $8, %rdx /* simulate "call" alignment */
movq %rdx, %rsp /* switch to UTS stack */
movq %rdx, %rbp /* set frame */
pushq %rsi
ret
jmpq *%rsi

View File

@ -35,7 +35,7 @@ __FBSDID("$FreeBSD$");
ENTRY(_amd64_enter_uts)
addq %rcx, %rdx /* get stack base */
andq $~0xf, %rdx /* align to 16 bytes */
subq $8, %rdx /* simulate "call" alignment */
movq %rdx, %rsp /* switch to UTS stack */
movq %rdx, %rbp /* set frame */
pushq %rsi
ret
jmpq *%rsi