diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2012-07-25 20:52:16 -0700 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2012-07-26 13:43:16 -0700 |
commit | 30b45d9c38e867457c805b5c008a50f9db16fcda (patch) | |
tree | c49c5c666da4dba1ff5d810212bb81e5d1373199 /libavutil | |
parent | 8ea1459bc32b55441fb49311fcee4f9f0fcf39b9 (diff) | |
download | ffmpeg-30b45d9c38e867457c805b5c008a50f9db16fcda.tar.gz |
x86inc: automatically insert vzeroupper for YMM functions.
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/x86/float_dsp.asm | 10 | ||||
-rw-r--r-- | libavutil/x86/x86inc.asm | 15 |
2 files changed, 12 insertions, 13 deletions
diff --git a/libavutil/x86/float_dsp.asm b/libavutil/x86/float_dsp.asm index 66ef09398d..c4e0c66280 100644 --- a/libavutil/x86/float_dsp.asm +++ b/libavutil/x86/float_dsp.asm @@ -40,12 +40,7 @@ ALIGN 16 sub lenq, 2*mmsize jge .loop -%if mmsize == 32 - vzeroupper - RET -%else REP_RET -%endif %endmacro INIT_XMM sse @@ -86,12 +81,7 @@ cglobal vector_fmac_scalar, 4,4,3, dst, src, mul, len mova [dstq+lenq+mmsize], m2 sub lenq, 2*mmsize jge .loop -%if mmsize == 32 - vzeroupper - RET -%else REP_RET -%endif %endmacro INIT_XMM sse diff --git a/libavutil/x86/x86inc.asm b/libavutil/x86/x86inc.asm index 42ba97ade5..b76a10ca5e 100644 --- a/libavutil/x86/x86inc.asm +++ b/libavutil/x86/x86inc.asm @@ -369,11 +369,14 @@ DECLARE_REG 14, R15, R15D, R15W, R15B, 120 %macro RET 0 WIN64_RESTORE_XMM_INTERNAL rsp POP_IF_USED 14, 13, 12, 11, 10, 9, 8, 7 +%if mmsize == 32 + vzeroupper +%endif ret %endmacro %macro REP_RET 0 - %if regs_used > 7 || xmm_regs_used > 6 + %if regs_used > 7 || xmm_regs_used > 6 || mmsize == 32 RET %else rep ret @@ -410,11 +413,14 @@ DECLARE_REG 14, R15, R15D, R15W, R15B, 72 %macro RET 0 POP_IF_USED 14, 13, 12, 11, 10, 9 +%if mmsize == 32 + vzeroupper +%endif ret %endmacro %macro REP_RET 0 - %if regs_used > 9 + %if regs_used > 9 || mmsize == 32 RET %else rep ret @@ -456,11 +462,14 @@ DECLARE_ARG 7, 8, 9, 10, 11, 12, 13, 14 %macro RET 0 POP_IF_USED 6, 5, 4, 3 +%if mmsize == 32 + vzeroupper +%endif ret %endmacro %macro REP_RET 0 - %if regs_used > 3 + %if regs_used > 3 || mmsize == 32 RET %else rep ret |