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:
parent
78cbf332e8
commit
c64582f235
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user