ntdll: Fix FPU initialization for new threads on x86-64.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48019
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
stable
Alexandre Julliard 2019-11-02 14:34:25 +01:00
parent 1b3fa02190
commit 0b2e65f53a
1 changed files with 2 additions and 1 deletions

View File

@ -4195,12 +4195,13 @@ static void init_thread_context( CONTEXT *context, LPTHREAD_START_ROUTINE entry,
{
__asm__( "movw %%cs,%0" : "=m" (context->SegCs) );
__asm__( "movw %%ss,%0" : "=m" (context->SegSs) );
__asm__( "fxsave %0" : "=m" (context->u.FltSave) );
context->Rcx = (ULONG_PTR)entry;
context->Rdx = (ULONG_PTR)arg;
context->Rsp = (ULONG_PTR)NtCurrentTeb()->Tib.StackBase - 0x28;
context->Rip = (ULONG_PTR)relay;
context->EFlags = 0x200;
context->u.FltSave.ControlWord = 0x27f;
context->u.FltSave.MxCsr = context->MxCsr = 0x1f80;
}