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
f64d86eb
Commit
f64d86eb
authored
Jun 26, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Support converting server contexts from one machine to another.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
542175ab
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
72 deletions
+2
-72
signal_i386.c
dlls/ntdll/unix/signal_i386.c
+0
-72
thread.c
dlls/ntdll/unix/thread.c
+0
-0
unix_private.h
dlls/ntdll/unix/unix_private.h
+2
-0
No files found.
dlls/ntdll/unix/signal_i386.c
View file @
f64d86eb
...
...
@@ -754,78 +754,6 @@ static inline void restore_fpu( const CONTEXT *context )
/***********************************************************************
* fpux_to_fpu
*
* Build a standard FPU context from an extended one.
*/
static
void
fpux_to_fpu
(
FLOATING_SAVE_AREA
*
fpu
,
const
XSAVE_FORMAT
*
fpux
)
{
unsigned
int
i
,
tag
,
stack_top
;
fpu
->
ControlWord
=
fpux
->
ControlWord
|
0xffff0000
;
fpu
->
StatusWord
=
fpux
->
StatusWord
|
0xffff0000
;
fpu
->
ErrorOffset
=
fpux
->
ErrorOffset
;
fpu
->
ErrorSelector
=
fpux
->
ErrorSelector
|
(
fpux
->
ErrorOpcode
<<
16
);
fpu
->
DataOffset
=
fpux
->
DataOffset
;
fpu
->
DataSelector
=
fpux
->
DataSelector
;
fpu
->
Cr0NpxState
=
fpux
->
StatusWord
|
0xffff0000
;
stack_top
=
(
fpux
->
StatusWord
>>
11
)
&
7
;
fpu
->
TagWord
=
0xffff0000
;
for
(
i
=
0
;
i
<
8
;
i
++
)
{
memcpy
(
&
fpu
->
RegisterArea
[
10
*
i
],
&
fpux
->
FloatRegisters
[
i
],
10
);
if
(
!
(
fpux
->
TagWord
&
(
1
<<
i
)))
tag
=
3
;
/* empty */
else
{
const
M128A
*
reg
=
&
fpux
->
FloatRegisters
[(
i
-
stack_top
)
&
7
];
if
((
reg
->
High
&
0x7fff
)
==
0x7fff
)
/* exponent all ones */
{
tag
=
2
;
/* special */
}
else
if
(
!
(
reg
->
High
&
0x7fff
))
/* exponent all zeroes */
{
if
(
reg
->
Low
)
tag
=
2
;
/* special */
else
tag
=
1
;
/* zero */
}
else
{
if
(
reg
->
Low
>>
63
)
tag
=
0
;
/* valid */
else
tag
=
2
;
/* special */
}
}
fpu
->
TagWord
|=
tag
<<
(
2
*
i
);
}
}
/***********************************************************************
* fpu_to_fpux
*
* Fill extended FPU context from standard one.
*/
static
void
fpu_to_fpux
(
XSAVE_FORMAT
*
fpux
,
const
FLOATING_SAVE_AREA
*
fpu
)
{
unsigned
int
i
;
fpux
->
ControlWord
=
fpu
->
ControlWord
;
fpux
->
StatusWord
=
fpu
->
StatusWord
;
fpux
->
ErrorOffset
=
fpu
->
ErrorOffset
;
fpux
->
ErrorSelector
=
fpu
->
ErrorSelector
;
fpux
->
ErrorOpcode
=
fpu
->
ErrorSelector
>>
16
;
fpux
->
DataOffset
=
fpu
->
DataOffset
;
fpux
->
DataSelector
=
fpu
->
DataSelector
;
fpux
->
TagWord
=
0
;
for
(
i
=
0
;
i
<
8
;
i
++
)
{
if
(((
fpu
->
TagWord
>>
(
i
*
2
))
&
3
)
!=
3
)
fpux
->
TagWord
|=
1
<<
i
;
memcpy
(
&
fpux
->
FloatRegisters
[
i
],
&
fpu
->
RegisterArea
[
10
*
i
],
10
);
}
}
/***********************************************************************
* save_context
*
* Build a context structure from the signal info.
...
...
dlls/ntdll/unix/thread.c
View file @
f64d86eb
This diff is collapsed.
Click to expand it.
dlls/ntdll/unix/unix_private.h
View file @
f64d86eb
...
...
@@ -179,6 +179,8 @@ extern void server_init_process_done(void) DECLSPEC_HIDDEN;
extern
void
server_init_thread
(
void
*
entry_point
,
BOOL
*
suspend
)
DECLSPEC_HIDDEN
;
extern
int
server_pipe
(
int
fd
[
2
]
)
DECLSPEC_HIDDEN
;
extern
void
fpux_to_fpu
(
I386_FLOATING_SAVE_AREA
*
fpu
,
const
XSAVE_FORMAT
*
fpux
)
DECLSPEC_HIDDEN
;
extern
void
fpu_to_fpux
(
XSAVE_FORMAT
*
fpux
,
const
I386_FLOATING_SAVE_AREA
*
fpu
)
DECLSPEC_HIDDEN
;
extern
void
set_thread_id
(
TEB
*
teb
,
DWORD
pid
,
DWORD
tid
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
init_thread_stack
(
TEB
*
teb
,
ULONG_PTR
zero_bits
,
SIZE_T
reserve_size
,
SIZE_T
commit_size
)
DECLSPEC_HIDDEN
;
extern
void
DECLSPEC_NORETURN
abort_thread
(
int
status
)
DECLSPEC_HIDDEN
;
...
...
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