Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
aae2e2ad
Commit
aae2e2ad
authored
Feb 24, 2021
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 24, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Fix compacted legacy xsave area handling.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7b95cdff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
2 deletions
+34
-2
signal_x86_64.c
dlls/ntdll/unix/signal_x86_64.c
+34
-2
No files found.
dlls/ntdll/unix/signal_x86_64.c
View file @
aae2e2ad
...
...
@@ -1848,6 +1848,7 @@ NTSTATUS WINAPI NtSetContextThread( HANDLE handle, const CONTEXT *context )
if
(
flags
&
CONTEXT_FLOATING_POINT
)
{
xsave
->
xsave
=
context
->
u
.
FltSave
;
xsave
->
xstate
.
Mask
|=
XSTATE_MASK_LEGACY
;
}
if
(
user_shared_data
->
XState
.
EnabledFeatures
&&
(
xs
=
xstate_from_context
(
context
)))
{
...
...
@@ -1941,8 +1942,39 @@ NTSTATUS WINAPI NtGetContextThread( HANDLE handle, CONTEXT *context )
}
if
(
needed_flags
&
CONTEXT_FLOATING_POINT
)
{
context
->
u
.
FltSave
=
get_syscall_xsave
(
frame
)
->
xsave
;
context
->
MxCsr
=
context
->
u
.
FltSave
.
MxCsr
;
struct
syscall_xsave
*
xsave
=
get_syscall_xsave
(
frame
);
if
(
!
xstate_compaction_enabled
||
(
xsave
->
xstate
.
Mask
&
XSTATE_MASK_LEGACY_FLOATING_POINT
))
{
memcpy
(
&
context
->
u
.
FltSave
,
&
xsave
->
xsave
,
FIELD_OFFSET
(
XSAVE_FORMAT
,
MxCsr
));
memcpy
(
context
->
u
.
FltSave
.
FloatRegisters
,
xsave
->
xsave
.
FloatRegisters
,
sizeof
(
context
->
u
.
FltSave
.
FloatRegisters
));
}
else
{
memset
(
&
context
->
u
.
FltSave
,
0
,
FIELD_OFFSET
(
XSAVE_FORMAT
,
MxCsr
));
memset
(
context
->
u
.
FltSave
.
FloatRegisters
,
0
,
sizeof
(
context
->
u
.
FltSave
.
FloatRegisters
));
context
->
u
.
FltSave
.
ControlWord
=
0x37f
;
}
if
(
!
xstate_compaction_enabled
||
(
xsave
->
xstate
.
Mask
&
XSTATE_MASK_LEGACY_SSE
))
{
memcpy
(
context
->
u
.
FltSave
.
XmmRegisters
,
xsave
->
xsave
.
XmmRegisters
,
sizeof
(
context
->
u
.
FltSave
.
XmmRegisters
));
context
->
u
.
FltSave
.
MxCsr
=
xsave
->
xsave
.
MxCsr
;
context
->
u
.
FltSave
.
MxCsr_Mask
=
xsave
->
xsave
.
MxCsr_Mask
;
}
else
{
memset
(
context
->
u
.
FltSave
.
XmmRegisters
,
0
,
sizeof
(
context
->
u
.
FltSave
.
XmmRegisters
));
context
->
u
.
FltSave
.
MxCsr
=
0x1f80
;
context
->
u
.
FltSave
.
MxCsr_Mask
=
0x2ffff
;
}
context
->
MxCsr
=
context
->
u
.
FltSave
.
MxCsr
;
context
->
ContextFlags
|=
CONTEXT_FLOATING_POINT
;
}
/* update the cached version of the debug registers */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment