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
2849ca9d
Commit
2849ca9d
authored
Jun 14, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Move the XSTATE definitions to the platform-specific files.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
bcc58788
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
69 additions
and
46 deletions
+69
-46
signal_i386.c
dlls/ntdll/unix/signal_i386.c
+35
-0
signal_x86_64.c
dlls/ntdll/unix/signal_x86_64.c
+34
-0
unix_private.h
dlls/ntdll/unix/unix_private.h
+0
-46
No files found.
dlls/ntdll/unix/signal_i386.c
View file @
2849ca9d
...
...
@@ -580,6 +580,41 @@ static BOOL is_inside_syscall( ucontext_t *sigcontext )
(
char
*
)
ESP_sig
(
sigcontext
)
<=
(
char
*
)
x86_thread_data
()
->
syscall_frame
);
}
struct
xcontext
{
CONTEXT
c
;
CONTEXT_EX
c_ex
;
ULONG64
host_compaction_mask
;
};
extern
BOOL
xstate_compaction_enabled
DECLSPEC_HIDDEN
;
static
inline
XSTATE
*
xstate_from_context
(
const
CONTEXT
*
context
)
{
CONTEXT_EX
*
xctx
=
(
CONTEXT_EX
*
)(
context
+
1
);
if
((
context
->
ContextFlags
&
CONTEXT_XSTATE
)
!=
CONTEXT_XSTATE
)
return
NULL
;
return
(
XSTATE
*
)((
char
*
)
xctx
+
xctx
->
XState
.
Offset
);
}
static
inline
void
context_init_xstate
(
CONTEXT
*
context
,
void
*
xstate_buffer
)
{
CONTEXT_EX
*
xctx
;
xctx
=
(
CONTEXT_EX
*
)(
context
+
1
);
xctx
->
Legacy
.
Length
=
sizeof
(
CONTEXT
);
xctx
->
Legacy
.
Offset
=
-
(
LONG
)
sizeof
(
CONTEXT
);
xctx
->
XState
.
Length
=
sizeof
(
XSTATE
);
xctx
->
XState
.
Offset
=
(
BYTE
*
)
xstate_buffer
-
(
BYTE
*
)
xctx
;
xctx
->
All
.
Length
=
sizeof
(
CONTEXT
)
+
xctx
->
XState
.
Offset
+
xctx
->
XState
.
Length
;
xctx
->
All
.
Offset
=
-
(
LONG
)
sizeof
(
CONTEXT
);
context
->
ContextFlags
|=
CONTEXT_XSTATE
;
}
#ifdef __sun
/* We have to workaround two Solaris breakages:
...
...
dlls/ntdll/unix/signal_x86_64.c
View file @
2849ca9d
...
...
@@ -329,6 +329,40 @@ static BOOL is_inside_syscall( ucontext_t *sigcontext )
}
struct
xcontext
{
CONTEXT
c
;
CONTEXT_EX
c_ex
;
ULONG64
host_compaction_mask
;
};
extern
BOOL
xstate_compaction_enabled
DECLSPEC_HIDDEN
;
static
inline
XSTATE
*
xstate_from_context
(
const
CONTEXT
*
context
)
{
CONTEXT_EX
*
xctx
=
(
CONTEXT_EX
*
)(
context
+
1
);
if
((
context
->
ContextFlags
&
CONTEXT_XSTATE
)
!=
CONTEXT_XSTATE
)
return
NULL
;
return
(
XSTATE
*
)((
char
*
)
xctx
+
xctx
->
XState
.
Offset
);
}
static
inline
void
context_init_xstate
(
CONTEXT
*
context
,
void
*
xstate_buffer
)
{
CONTEXT_EX
*
xctx
;
xctx
=
(
CONTEXT_EX
*
)(
context
+
1
);
xctx
->
Legacy
.
Length
=
sizeof
(
CONTEXT
);
xctx
->
Legacy
.
Offset
=
-
(
LONG
)
sizeof
(
CONTEXT
);
xctx
->
XState
.
Length
=
sizeof
(
XSTATE
);
xctx
->
XState
.
Offset
=
(
BYTE
*
)
xstate_buffer
-
(
BYTE
*
)
xctx
;
xctx
->
All
.
Length
=
sizeof
(
CONTEXT
)
+
xctx
->
XState
.
Offset
+
xctx
->
XState
.
Length
;
xctx
->
All
.
Offset
=
-
(
LONG
)
sizeof
(
CONTEXT
);
context
->
ContextFlags
|=
CONTEXT_XSTATE
;
}
/***********************************************************************
* Definitions for Dwarf unwind tables
*/
...
...
dlls/ntdll/unix/unix_private.h
View file @
2849ca9d
...
...
@@ -335,52 +335,6 @@ static inline TEB64 *NtCurrentTeb64(void) { return NULL; }
static
inline
TEB64
*
NtCurrentTeb64
(
void
)
{
return
(
TEB64
*
)
NtCurrentTeb
()
->
GdiBatchCount
;
}
#endif
struct
xcontext
{
CONTEXT
c
;
CONTEXT_EX
c_ex
;
ULONG64
host_compaction_mask
;
};
#if defined(__i386__) || defined(__x86_64__)
extern
BOOL
xstate_compaction_enabled
DECLSPEC_HIDDEN
;
static
inline
XSTATE
*
xstate_from_context
(
const
CONTEXT
*
context
)
{
CONTEXT_EX
*
xctx
=
(
CONTEXT_EX
*
)(
context
+
1
);
if
((
context
->
ContextFlags
&
CONTEXT_XSTATE
)
!=
CONTEXT_XSTATE
)
return
NULL
;
return
(
XSTATE
*
)((
char
*
)(
context
+
1
)
+
xctx
->
XState
.
Offset
);
}
static
inline
void
context_init_xstate
(
CONTEXT
*
context
,
void
*
xstate_buffer
)
{
CONTEXT_EX
*
xctx
;
xctx
=
(
CONTEXT_EX
*
)(
context
+
1
);
xctx
->
Legacy
.
Length
=
sizeof
(
CONTEXT
);
xctx
->
Legacy
.
Offset
=
-
(
LONG
)
sizeof
(
CONTEXT
);
xctx
->
XState
.
Length
=
sizeof
(
XSTATE
);
xctx
->
XState
.
Offset
=
(
BYTE
*
)
xstate_buffer
-
(
BYTE
*
)
xctx
;
xctx
->
All
.
Length
=
sizeof
(
CONTEXT
)
+
xctx
->
XState
.
Offset
+
xctx
->
XState
.
Length
;
xctx
->
All
.
Offset
=
-
(
LONG
)
sizeof
(
CONTEXT
);
context
->
ContextFlags
|=
0x40
;
}
#else
static
inline
XSTATE
*
xstate_from_context
(
const
CONTEXT
*
context
)
{
return
NULL
;
}
static
inline
void
context_init_xstate
(
CONTEXT
*
context
,
void
*
xstate_buffer
)
{
}
#endif
enum
loadorder
{
LO_INVALID
,
...
...
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