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
34e49897
Commit
34e49897
authored
Apr 08, 2024
by
Paul Gofman
Committed by
Alexandre Julliard
Apr 09, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wow64: Support generic xstate in call_user_exception_dispatcher().
parent
ff97d397
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
20 deletions
+6
-20
syscall.c
dlls/wow64/syscall.c
+6
-20
No files found.
dlls/wow64/syscall.c
View file @
34e49897
...
...
@@ -197,17 +197,12 @@ static void __attribute__((used)) call_user_exception_dispatcher( EXCEPTION_RECO
ULONG
context_ptr
;
/* 004 */
EXCEPTION_RECORD32
rec
;
/* 008 */
I386_CONTEXT
context
;
/* 058 */
CONTEXT_EX32
context_ex
;
/* 324 */
BYTE
xstate
[
sizeof
(
XSTATE
)
+
64
];
/* 33c */
DWORD
align
;
/* 4bc */
}
*
stack
;
I386_CONTEXT
ctx
=
{
CONTEXT_I386_ALL
};
CONTEXT_EX
*
context_ex
,
*
src_ex
=
NULL
;
ULONG
flags
;
ULONG
flags
,
context_length
;
C_ASSERT
(
offsetof
(
struct
exc_stack_layout32
,
context
)
==
0x58
);
C_ASSERT
(
offsetof
(
struct
exc_stack_layout32
,
xstate
)
==
0x33c
);
C_ASSERT
(
sizeof
(
struct
exc_stack_layout32
)
==
0x4c0
);
pBTCpuGetContext
(
GetCurrentThread
(),
GetCurrentProcess
(),
NULL
,
&
ctx
);
...
...
@@ -231,29 +226,20 @@ static void __attribute__((used)) call_user_exception_dispatcher( EXCEPTION_RECO
flags
=
ctx
.
ContextFlags
;
if
(
src_ex
)
flags
|=
CONTEXT_I386_XSTATE
;
stack
=
(
struct
exc_stack_layout32
*
)
ULongToPtr
(
ctx
.
Esp
&
~
3
)
-
1
;
RtlGetExtendedContextLength
(
flags
,
&
context_length
);
stack
=
(
struct
exc_stack_layout32
*
)
ULongToPtr
(
(
ctx
.
Esp
-
offsetof
(
struct
exc_stack_layout32
,
context
)
-
context_length
)
&
~
3
);
stack
->
rec_ptr
=
PtrToUlong
(
&
stack
->
rec
);
stack
->
context_ptr
=
PtrToUlong
(
&
stack
->
context
);
stack
->
rec
=
*
rec
;
stack
->
context
=
ctx
;
RtlInitializeExtendedContext
(
&
stack
->
context
,
flags
,
&
context_ex
);
if
(
src_ex
)
RtlCopyExtendedContext
(
context_ex
,
WOW64_CONTEXT_XSTATE
,
src_ex
);
/* adjust Eip for breakpoints in software emulation (hardware exceptions already adjust Rip) */
if
(
rec
->
ExceptionCode
==
EXCEPTION_BREAKPOINT
&&
(
wow64info
->
CpuFlags
&
WOW64_CPUFLAGS_SOFTWARE
))
stack
->
context
.
Eip
--
;
if
(
src_ex
)
{
XSTATE
*
src_xs
=
(
XSTATE
*
)((
char
*
)
src_ex
+
src_ex
->
XState
.
Offset
);
XSTATE
*
dst_xs
=
(
XSTATE
*
)((
char
*
)
context_ex
+
context_ex
->
XState
.
Offset
);
dst_xs
->
Mask
=
src_xs
->
Mask
&
~
(
ULONG64
)
3
;
dst_xs
->
CompactionMask
=
src_xs
->
CompactionMask
;
if
((
dst_xs
->
Mask
&
4
)
&&
src_ex
->
XState
.
Length
>=
sizeof
(
XSTATE
)
&&
context_ex
->
XState
.
Length
>=
sizeof
(
XSTATE
))
memcpy
(
&
dst_xs
->
YmmContext
,
&
src_xs
->
YmmContext
,
sizeof
(
dst_xs
->
YmmContext
)
);
}
ctx
.
Esp
=
PtrToUlong
(
stack
);
ctx
.
Eip
=
pLdrSystemDllInitBlock
->
pKiUserExceptionDispatcher
;
ctx
.
EFlags
&=
~
(
0x100
|
0x400
|
0x40000
);
...
...
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