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
8a888934
Commit
8a888934
authored
Aug 20, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Fix exception information for SSE floating point faults.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
17ba916c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
10 deletions
+16
-10
exception.c
dlls/ntdll/tests/exception.c
+6
-7
signal_i386.c
dlls/ntdll/unix/signal_i386.c
+2
-3
signal_x86_64.c
dlls/ntdll/unix/signal_x86_64.c
+8
-0
No files found.
dlls/ntdll/tests/exception.c
View file @
8a888934
...
...
@@ -1332,8 +1332,11 @@ static DWORD simd_fault_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_R
"exception code: %#x, should be %#x
\n
"
,
rec
->
ExceptionCode
,
STATUS_FLOAT_MULTIPLE_TRAPS
);
ok
(
rec
->
NumberParameters
==
is_wow64
?
2
:
1
,
"# of params: %i
\n
"
,
rec
->
NumberParameters
);
if
(
rec
->
NumberParameters
>=
1
)
ok
(
rec
->
ExceptionInformation
[
0
]
==
0
,
"param #1: %lx, should be 0
\n
"
,
rec
->
ExceptionInformation
[
0
]);
if
(
rec
->
NumberParameters
==
2
)
ok
(
rec
->
ExceptionInformation
[
1
]
==
((
XSAVE_FORMAT
*
)
context
->
ExtendedRegisters
)
->
MxCsr
,
"param #1: %lx / %x
\n
"
,
rec
->
ExceptionInformation
[
1
],
((
XSAVE_FORMAT
*
)
context
->
ExtendedRegisters
)
->
MxCsr
);
}
context
->
Eip
+=
3
;
/* skip divps */
}
...
...
@@ -3413,14 +3416,10 @@ static DWORD WINAPI simd_fault_handler( EXCEPTION_RECORD *rec, ULONG64 frame,
ULONG
expect
=
*
stage
==
2
?
EXCEPTION_FLT_DIVIDE_BY_ZERO
:
EXCEPTION_FLT_INVALID_OPERATION
;
ok
(
rec
->
ExceptionCode
==
expect
,
"exception code: %#x, should be %#x
\n
"
,
rec
->
ExceptionCode
,
expect
);
todo_wine
ok
(
rec
->
NumberParameters
==
2
,
"# of params: %i, should be 2
\n
"
,
rec
->
NumberParameters
);
if
(
rec
->
NumberParameters
==
2
)
{
/* no idea what these mean */
ok
(
rec
->
ExceptionInformation
[
0
]
==
0
,
"param #0: %lx
\n
"
,
rec
->
ExceptionInformation
[
0
]);
ok
(
rec
->
ExceptionInformation
[
1
]
!=
0
,
"param #1: %lx
\n
"
,
rec
->
ExceptionInformation
[
1
]);
}
ok
(
rec
->
ExceptionInformation
[
1
]
==
context
->
MxCsr
,
"param #1: %lx / %lx
\n
"
,
rec
->
ExceptionInformation
[
1
],
context
->
MxCsr
);
}
context
->
Rip
+=
3
;
/* skip divps */
}
...
...
dlls/ntdll/unix/signal_i386.c
View file @
8a888934
...
...
@@ -1956,9 +1956,8 @@ static void fpe_handler( int signal, siginfo_t *siginfo, void *sigcontext )
siginfo
->
si_code
);
rec
.
ExceptionCode
=
STATUS_FLOAT_MULTIPLE_TRAPS
;
rec
.
NumberParameters
=
1
;
/* no idea what meaning is actually behind this but that's what native does */
rec
.
ExceptionInformation
[
0
]
=
0
;
rec
.
ExceptionInformation
[
rec
.
NumberParameters
++
]
=
0
;
if
(
is_wow64
)
rec
.
ExceptionInformation
[
rec
.
NumberParameters
++
]
=
((
XSAVE_FORMAT
*
)
xcontext
.
c
.
ExtendedRegisters
)
->
MxCsr
;
break
;
default:
WINE_ERR
(
"Got unexpected trap %d
\n
"
,
TRAP_sig
(
ucontext
)
);
...
...
dlls/ntdll/unix/signal_x86_64.c
View file @
8a888934
...
...
@@ -2664,6 +2664,7 @@ static void trap_handler( int signal, siginfo_t *siginfo, void *sigcontext )
static
void
fpe_handler
(
int
signal
,
siginfo_t
*
siginfo
,
void
*
sigcontext
)
{
EXCEPTION_RECORD
rec
=
{
0
};
ucontext_t
*
ucontext
=
sigcontext
;
switch
(
siginfo
->
si_code
)
{
...
...
@@ -2693,6 +2694,13 @@ static void fpe_handler( int signal, siginfo_t *siginfo, void *sigcontext )
rec
.
ExceptionCode
=
EXCEPTION_FLT_INVALID_OPERATION
;
break
;
}
if
(
TRAP_sig
(
ucontext
)
==
TRAP_x86_CACHEFLT
)
{
rec
.
NumberParameters
=
2
;
rec
.
ExceptionInformation
[
0
]
=
0
;
rec
.
ExceptionInformation
[
1
]
=
FPU_sig
(
ucontext
)
?
FPU_sig
(
ucontext
)
->
MxCsr
:
0
;
}
setup_exception
(
sigcontext
,
&
rec
);
}
...
...
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