Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
6b78bcff
Commit
6b78bcff
authored
Dec 21, 2021
by
Paul Gofman
Committed by
Alexandre Julliard
Dec 21, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Restore FP status words from MSVCRT_JUMP_BUFFER on x64.
Signed-off-by:
Paul Gofman
<
pgofman@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e9282254
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
1 deletion
+22
-1
signal_x86_64.c
dlls/ntdll/signal_x86_64.c
+6
-1
exception.c
dlls/ntdll/tests/exception.c
+16
-0
No files found.
dlls/ntdll/signal_x86_64.c
View file @
6b78bcff
...
...
@@ -64,7 +64,9 @@ struct MSVCRT_JUMP_BUFFER
ULONG64
R14
;
ULONG64
R15
;
ULONG64
Rip
;
ULONG64
Spare
;
ULONG
MxCsr
;
USHORT
FpCsr
;
USHORT
Spare
;
M128A
Xmm6
;
M128A
Xmm7
;
M128A
Xmm8
;
...
...
@@ -1218,6 +1220,9 @@ void CDECL RtlRestoreContext( CONTEXT *context, EXCEPTION_RECORD *rec )
context
->
u
.
s
.
Xmm13
=
jmp
->
Xmm13
;
context
->
u
.
s
.
Xmm14
=
jmp
->
Xmm14
;
context
->
u
.
s
.
Xmm15
=
jmp
->
Xmm15
;
context
->
MxCsr
=
jmp
->
MxCsr
;
context
->
u
.
FltSave
.
MxCsr
=
jmp
->
MxCsr
;
context
->
u
.
FltSave
.
ControlWord
=
jmp
->
FpCsr
;
}
else
if
(
rec
&&
rec
->
ExceptionCode
==
STATUS_UNWIND_CONSOLIDATE
&&
rec
->
NumberParameters
>=
1
)
{
...
...
dlls/ntdll/tests/exception.c
View file @
6b78bcff
...
...
@@ -2460,6 +2460,10 @@ static void test_restore_context(void)
rec
.
NumberParameters
=
1
;
rec
.
ExceptionInformation
[
0
]
=
(
DWORD64
)
&
buf
;
ok
(
buf
.
MxCsr
==
0x1f80
,
"Got unexpected MxCsr %#x.
\n
"
,
buf
.
MxCsr
);
ok
(
buf
.
FpCsr
==
0x27f
,
"Got unexpected FpCsr %#x.
\n
"
,
buf
.
FpCsr
);
buf
.
FpCsr
=
0x7f
;
buf
.
MxCsr
=
0x3f80
;
/* uses buf.Rip instead of ctx.Rip */
pRtlRestoreContext
(
&
ctx
,
&
rec
);
ok
(
0
,
"shouldn't be reached
\n
"
);
...
...
@@ -2487,6 +2491,18 @@ static void test_restore_context(void)
"longjmp failed for Xmm%d, expected %lx, got %lx
\n
"
,
i
+
6
,
fltsave
[
i
].
Part
[
1
],
ctx
.
FltSave
.
XmmRegisters
[
i
+
6
].
High
);
}
ok
(
ctx
.
FltSave
.
ControlWord
==
0x7f
,
"Got unexpected float control word %#x.
\n
"
,
ctx
.
FltSave
.
ControlWord
);
ok
(
ctx
.
MxCsr
==
0x3f80
,
"Got unexpected MxCsr %#x.
\n
"
,
ctx
.
MxCsr
);
ok
(
ctx
.
FltSave
.
MxCsr
==
0x3f80
,
"Got unexpected MxCsr %#x.
\n
"
,
ctx
.
FltSave
.
MxCsr
);
buf
.
FpCsr
=
0x27f
;
buf
.
MxCsr
=
0x1f80
;
pRtlRestoreContext
(
&
ctx
,
&
rec
);
ok
(
0
,
"shouldn't be reached
\n
"
);
}
else
if
(
pass
==
5
)
{
ok
(
ctx
.
FltSave
.
ControlWord
==
0x27f
,
"Got unexpected float control word %#x.
\n
"
,
ctx
.
FltSave
.
ControlWord
);
ok
(
ctx
.
FltSave
.
MxCsr
==
0x1f80
,
"Got unexpected MxCsr %#x.
\n
"
,
ctx
.
MxCsr
);
}
else
ok
(
0
,
"unexpected pass %d
\n
"
,
pass
);
...
...
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