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
a8856381
Commit
a8856381
authored
Feb 22, 2021
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 22, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Use xsavec in x86_64 syscall dispatcher.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
437bef6a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
2 deletions
+23
-2
signal_x86_64.c
dlls/ntdll/unix/signal_x86_64.c
+4
-1
system.c
dlls/ntdll/unix/system.c
+6
-0
winternl.h
include/winternl.h
+1
-0
import.c
tools/winebuild/import.c
+12
-1
No files found.
dlls/ntdll/unix/signal_x86_64.c
View file @
a8856381
...
...
@@ -2814,9 +2814,12 @@ void *signal_init_syscalls(void)
void
*
ptr
,
*
syscall_dispatcher
;
extern
void
__wine_syscall_dispatcher_xsave
(
void
)
DECLSPEC_HIDDEN
;
extern
void
__wine_syscall_dispatcher_xsavec
(
void
)
DECLSPEC_HIDDEN
;
NtQuerySystemInformation
(
SystemCpuInformation
,
&
cpu_info
,
sizeof
(
cpu_info
),
NULL
);
if
(
cpu_info
.
FeatureSet
&
CPU_FEATURE_XSAVE
)
if
(
cpu_info
.
FeatureSet
&
CPU_FEATURE_XSAVEC
)
syscall_dispatcher
=
__wine_syscall_dispatcher_xsavec
;
else
if
(
cpu_info
.
FeatureSet
&
CPU_FEATURE_XSAVE
)
syscall_dispatcher
=
__wine_syscall_dispatcher_xsave
;
else
syscall_dispatcher
=
__wine_syscall_dispatcher
;
...
...
dlls/ntdll/unix/system.c
View file @
a8856381
...
...
@@ -305,6 +305,12 @@ static void get_cpuinfo( SYSTEM_CPU_INFORMATION *info )
if
(
regs3
[
1
]
&
(
1
<<
5
))
info
->
FeatureSet
|=
CPU_FEATURE_AVX2
;
}
if
(
info
->
FeatureSet
&
CPU_FEATURE_XSAVE
)
{
do_cpuid
(
0x0000000d
,
regs3
);
/* get XSAVE details */
if
(
regs3
[
0
]
&
2
)
info
->
FeatureSet
|=
CPU_FEATURE_XSAVEC
;
}
if
(
regs
[
1
]
==
AUTH
&&
regs
[
3
]
==
ENTI
&&
regs
[
2
]
==
CAMD
)
{
info
->
Level
=
(
regs2
[
0
]
>>
8
)
&
0xf
;
/* family */
...
...
include/winternl.h
View file @
a8856381
...
...
@@ -1754,6 +1754,7 @@ typedef struct _SYSTEM_CPU_INFORMATION {
/* FIXME: following values are made up, actual flags are unknown */
#define CPU_FEATURE_SSSE3 0x00008000
/* SSSE3 instructions */
#define CPU_FEATURE_XSAVEC 0x00400000
/* XSAVEC instructions */
#define CPU_FEATURE_SSE41 0x01000000
/* SSE41 instructions */
#define CPU_FEATURE_SSE42 0x02000000
/* SSE42 instructions */
#define CPU_FEATURE_AVX 0x40000000
/* AVX instructions */
...
...
tools/winebuild/import.c
View file @
a8856381
...
...
@@ -1534,7 +1534,17 @@ static void output_syscall_dispatcher( int count, const char *variant )
output
(
"
\t
movq %%rdx,0x200(%%r12)
\n
"
);
output
(
"
\t
movq %%rdx,0x208(%%r12)
\n
"
);
output
(
"
\t
movq %%rdx,0x210(%%r12)
\n
"
);
output
(
"
\t
xsave64 (%%r12)
\n
"
);
if
(
!
strcmp
(
variant
,
"_xsavec"
))
{
output
(
"
\t
movq %%rdx,0x218(%%r12)
\n
"
);
output
(
"
\t
movq %%rdx,0x220(%%r12)
\n
"
);
output
(
"
\t
movq %%rdx,0x228(%%r12)
\n
"
);
output
(
"
\t
movq %%rdx,0x230(%%r12)
\n
"
);
output
(
"
\t
movq %%rdx,0x238(%%r12)
\n
"
);
output
(
"
\t
xsavec64 (%%r12)
\n
"
);
}
else
output
(
"
\t
xsave64 (%%r12)
\n
"
);
output
(
"
\t
movq %%rsi,%%rdx
\n
"
);
}
output
(
"
\t
movq %%gs:0x30,%%rcx
\n
"
);
...
...
@@ -1740,6 +1750,7 @@ void output_syscalls( DLLSPEC *spec )
{
case
CPU_x86_64
:
output_syscall_dispatcher
(
count
,
"_xsave"
);
output_syscall_dispatcher
(
count
,
"_xsavec"
);
break
;
default:
break
;
...
...
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