ntdll: Reset YMM state in NtSetContextThread() if that is assumed by the context being set.

Fixes test failure on testbot where compaction is not supported
(resetting YMM state if that is implied by the context being set).

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Paul Gofman 2021-03-03 14:55:00 +03:00 committed by Alexandre Julliard
parent 9b7261d995
commit 633db76f78
2 changed files with 2 additions and 2 deletions

View File

@ -1254,7 +1254,7 @@ NTSTATUS WINAPI NtSetContextThread( HANDLE handle, const CONTEXT *context )
xsave->xstate.mask |= XSTATE_MASK_GSSE;
memcpy( &xsave->xstate.ymm_high, &xs->YmmContext, sizeof(xsave->xstate.ymm_high) );
}
else if (xs->CompactionMask & XSTATE_MASK_GSSE)
else
xsave->xstate.mask &= ~XSTATE_MASK_GSSE;
}

View File

@ -1864,7 +1864,7 @@ NTSTATUS WINAPI NtSetContextThread( HANDLE handle, const CONTEXT *context )
xsave->xstate.Mask |= XSTATE_MASK_GSSE;
memcpy( &xsave->xstate.YmmContext, &xs->YmmContext, sizeof(xs->YmmContext) );
}
else if (xs->CompactionMask & XSTATE_MASK_GSSE)
else
xsave->xstate.Mask &= ~XSTATE_MASK_GSSE;
}
return STATUS_SUCCESS;