Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
x264
Commits
ed56837e
Commit
ed56837e
authored
Jul 26, 2012
by
Ronald S. Bultje
Committed by
Fiona Glaser
Jul 26, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x86inc: automatically insert vzeroupper for YMM functions
Backported from libav.
parent
cbb90707
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
common/x86/mc-a2.asm
common/x86/mc-a2.asm
+1
-2
common/x86/x86inc.asm
common/x86/x86inc.asm
+12
-3
No files found.
common/x86/mc-a2.asm
View file @
ed56837e
...
@@ -1786,5 +1786,4 @@ cglobal mbtree_propagate_cost, 7,7,8
...
@@ -1786,5 +1786,4 @@ cglobal mbtree_propagate_cost, 7,7,8
vmovdqu
[
r0
+
r6
*
2
],
ymm1
vmovdqu
[
r0
+
r6
*
2
],
ymm1
add
r6
,
16
add
r6
,
16
jl
.loop
jl
.loop
vzeroupper
REP_RET
RET
common/x86/x86inc.asm
View file @
ed56837e
...
@@ -368,11 +368,14 @@ DECLARE_REG 14, R15, 120
...
@@ -368,11 +368,14 @@ DECLARE_REG 14, R15, 120
%assign xmm_regs_used 0
%assign xmm_regs_used 0
%endmacro
%endmacro
%define has_epilogue regs_used > 7 || xmm_regs_used > 6
%define has_epilogue regs_used > 7 || xmm_regs_used > 6
|| mmsize == 32
%macro RET 0
%macro RET 0
WIN64_RESTORE_XMM_INTERNAL
rsp
WIN64_RESTORE_XMM_INTERNAL
rsp
POP_IF_USED
14
,
13
,
12
,
11
,
10
,
9
,
8
,
7
POP_IF_USED
14
,
13
,
12
,
11
,
10
,
9
,
8
,
7
%if mmsize == 32
vzeroupper
%endif
ret
ret
%endmacro
%endmacro
...
@@ -404,10 +407,13 @@ DECLARE_REG 14, R15, 72
...
@@ -404,10 +407,13 @@ DECLARE_REG 14, R15, 72
DEFINE_ARGS
%
4
DEFINE_ARGS
%
4
%endmacro
%endmacro
%define has_epilogue regs_used > 9
%define has_epilogue regs_used > 9
|| mmsize == 32
%macro RET 0
%macro RET 0
POP_IF_USED
14
,
13
,
12
,
11
,
10
,
9
POP_IF_USED
14
,
13
,
12
,
11
,
10
,
9
%if mmsize == 32
vzeroupper
%endif
ret
ret
%endmacro
%endmacro
...
@@ -444,10 +450,13 @@ DECLARE_ARG 7, 8, 9, 10, 11, 12, 13, 14
...
@@ -444,10 +450,13 @@ DECLARE_ARG 7, 8, 9, 10, 11, 12, 13, 14
DEFINE_ARGS
%
4
DEFINE_ARGS
%
4
%endmacro
%endmacro
%define has_epilogue regs_used > 3
%define has_epilogue regs_used > 3
|| mmsize == 32
%macro RET 0
%macro RET 0
POP_IF_USED
6
,
5
,
4
,
3
POP_IF_USED
6
,
5
,
4
,
3
%if mmsize == 32
vzeroupper
%endif
ret
ret
%endmacro
%endmacro
...
...
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