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
5d228d6f
Commit
5d228d6f
authored
Mar 02, 2021
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 02, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Store x86 YMM context insyscall dispatcher.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0712b6b1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
5 deletions
+27
-5
signal_i386.c
dlls/ntdll/unix/signal_i386.c
+12
-2
import.c
tools/winebuild/import.c
+15
-3
No files found.
dlls/ntdll/unix/signal_i386.c
View file @
5d228d6f
...
...
@@ -468,9 +468,16 @@ struct syscall_xsave
XSAVE_FORMAT
xsave
;
FLOATING_SAVE_AREA
fsave
;
}
u
;
struct
{
ULONG64
mask
;
ULONG64
compaction_mask
;
ULONG64
reserved
[
6
];
M128A
ymm_high
[
8
];
}
xstate
;
};
C_ASSERT
(
sizeof
(
struct
syscall_xsave
)
==
0x2
0
0
);
C_ASSERT
(
sizeof
(
struct
syscall_xsave
)
==
0x2
c
0
);
struct
syscall_frame
{
...
...
@@ -2551,8 +2558,11 @@ void signal_init_process(void)
void
*
signal_init_syscalls
(
void
)
{
extern
void
__wine_syscall_dispatcher_fxsave
(
void
)
DECLSPEC_HIDDEN
;
extern
void
__wine_syscall_dispatcher_xsave
(
void
)
DECLSPEC_HIDDEN
;
if
(
cpu_info
.
FeatureSet
&
CPU_FEATURE_FXSR
)
if
(
cpu_info
.
FeatureSet
&
CPU_FEATURE_XSAVE
)
syscall_dispatcher
=
__wine_syscall_dispatcher_xsave
;
else
if
(
cpu_info
.
FeatureSet
&
CPU_FEATURE_FXSR
)
syscall_dispatcher
=
__wine_syscall_dispatcher_fxsave
;
else
syscall_dispatcher
=
__wine_syscall_dispatcher
;
...
...
tools/winebuild/import.c
View file @
5d228d6f
...
...
@@ -1425,6 +1425,7 @@ static void output_syscall_dispatcher( int count, const char *variant )
{
const
unsigned
int
invalid_param
=
0xc000000d
;
/* STATUS_INVALID_PARAMETER */
const
char
*
symbol
=
strmake
(
"__wine_syscall_dispatcher%s"
,
variant
);
unsigned
int
i
;
output
(
"
\t
.align %d
\n
"
,
get_alignment
(
4
)
);
output
(
"
\t
%s
\n
"
,
func_declaration
(
symbol
)
);
...
...
@@ -1456,17 +1457,27 @@ static void output_syscall_dispatcher( int count, const char *variant )
output
(
"
\t
movl %%ecx,-0x28(%%ebp)
\n
"
);
/* frame->esp */
output
(
"
\t
movl 4(%%ebp),%%ecx
\n
"
);
output
(
"
\t
movl %%ecx,-0x2c(%%ebp)
\n
"
);
/* frame->eip */
output
(
"
\t
subl $0x2
0
0,%%esp
\n
"
)
;
output
(
"
\t
subl $0x2
c
0,%%esp
\n
"
)
;
output
(
"
\t
andl $~63,%%esp
\n
"
);
if
(
!*
variant
)
{
output
(
"
\t
fnsave (%%esp)
\n
"
);
output
(
"
\t
fwait
\n
"
);
}
else
else
if
(
!
strcmp
(
variant
,
"_fxsave"
))
{
output
(
"
\t
fxsave (%%esp)
\n
"
);
}
else
{
output
(
"
\t
movl %%eax,%%ecx
\n
"
);
output
(
"
\t
movl $7,%%eax
\n
"
);
output
(
"
\t
xorl %%edx,%%edx
\n
"
);
for
(
i
=
0
;
i
<
6
;
i
++
)
output
(
"
\t
movl %%edx,0x%x(%%esp)
\n
"
,
0x200
+
i
*
4
);
output
(
"
\t
xsave (%%esp)
\n
"
);
output
(
"
\t
movl %%ecx,%%eax
\n
"
);
}
output
(
"
\t
leal -0x30(%%ebp),%%ecx
\n
"
);
output
(
"
\t
movl %%ecx,%%fs:0x1f8
\n
"
);
/* x86_thread_data()->syscall_frame */
output
(
"
\t
cmpl $%u,%%eax
\n
"
,
count
);
...
...
@@ -1491,7 +1502,7 @@ static void output_syscall_dispatcher( int count, const char *variant )
else
output
(
"
\t
call *.Lsyscall_table(,%%eax,4)
\n
"
);
output
(
"2:
\t
movl $0,%%fs:0x1f8
\n
"
);
output
(
"
\t
leal -0x2
3
0(%%ebp),%%ebx
\n
"
)
;
output
(
"
\t
leal -0x2
f
0(%%ebp),%%ebx
\n
"
)
;
output
(
"
\t
andl $~63,%%ebx
\n
"
);
if
(
!*
variant
)
{
...
...
@@ -1817,6 +1828,7 @@ void output_syscalls( DLLSPEC *spec )
{
case
CPU_x86
:
output_syscall_dispatcher
(
count
,
"_fxsave"
);
output_syscall_dispatcher
(
count
,
"_xsave"
);
break
;
case
CPU_x86_64
:
output_syscall_dispatcher
(
count
,
"_xsave"
);
...
...
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