diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-10-14 15:53:46 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-10-14 15:54:23 +0200 |
commit | 9ac124c889a6b3a8472f3bdfda2c379cb4ddaefa (patch) | |
tree | 208aaba8c3b9eca0b79218520a559657cdd88acf | |
parent | 12e4493f9c143f34e733a959059cea1a2ac664c5 (diff) | |
parent | 206895708ea2b464755d340e44501daf9a07c310 (diff) | |
download | ffmpeg-9ac124c889a6b3a8472f3bdfda2c379cb4ddaefa.tar.gz |
Merge commit '206895708ea2b464755d340e44501daf9a07c310'
* commit '206895708ea2b464755d340e44501daf9a07c310':
x86inc: Remove our FMA4 support
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavresample/x86/audio_mix.asm | 18 | ||||
-rw-r--r-- | libavutil/x86/x86inc.asm | 16 | ||||
-rw-r--r-- | libavutil/x86/x86util.asm | 11 |
3 files changed, 25 insertions, 20 deletions
diff --git a/libavresample/x86/audio_mix.asm b/libavresample/x86/audio_mix.asm index 982a13556a..64ab0399f8 100644 --- a/libavresample/x86/audio_mix.asm +++ b/libavresample/x86/audio_mix.asm @@ -390,10 +390,10 @@ cglobal mix_%1_to_%2_%3_flt, 3,in_channels+2,needed_mmregs+matrix_elements_mm, n S16_TO_S32_SX 4, 5 cvtdq2ps m4, m4 cvtdq2ps m5, m5 - fmaddps m2, m4, mx_1_ %+ %%i, m2, m6 - fmaddps m3, m5, mx_1_ %+ %%i, m3, m6 - fmaddps m0, m4, mx_0_ %+ %%i, m0, m4 - fmaddps m1, m5, mx_0_ %+ %%i, m1, m5 + FMULADD_PS m2, m4, mx_1_ %+ %%i, m2, m6 + FMULADD_PS m3, m5, mx_1_ %+ %%i, m3, m6 + FMULADD_PS m0, m4, mx_0_ %+ %%i, m0, m4 + FMULADD_PS m1, m5, mx_0_ %+ %%i, m1, m5 %else %if copy_src_from_stack mov src_ptr, src %+ %%i %+ m @@ -402,8 +402,8 @@ cglobal mix_%1_to_%2_%3_flt, 3,in_channels+2,needed_mmregs+matrix_elements_mm, n S16_TO_S32_SX 2, 3 cvtdq2ps m2, m2 cvtdq2ps m3, m3 - fmaddps m0, m2, mx_0_ %+ %%i, m0, m4 - fmaddps m1, m3, mx_0_ %+ %%i, m1, m4 + FMULADD_PS m0, m2, mx_0_ %+ %%i, m0, m4 + FMULADD_PS m1, m3, mx_0_ %+ %%i, m1, m4 %endif %assign %%i %%i+1 %endrep @@ -443,12 +443,12 @@ cglobal mix_%1_to_%2_%3_flt, 3,in_channels+2,needed_mmregs+matrix_elements_mm, n mova m2, [src_ptr+lenq] %endif %if stereo - fmaddps m1, m2, mx_1_ %+ %%i, m1, m3 + FMULADD_PS m1, m2, mx_1_ %+ %%i, m1, m3 %endif %if stereo || mx_stack_0_ %+ %%i - fmaddps m0, m2, mx_0_ %+ %%i, m0, m2 + FMULADD_PS m0, m2, mx_0_ %+ %%i, m0, m2 %else - fmaddps m0, mx_0_ %+ %%i, [src_ptr+lenq], m0, m1 + FMULADD_PS m0, mx_0_ %+ %%i, [src_ptr+lenq], m0, m1 %endif %assign %%i %%i+1 %endrep diff --git a/libavutil/x86/x86inc.asm b/libavutil/x86/x86inc.asm index bffe0a279c..4c794def0c 100644 --- a/libavutil/x86/x86inc.asm +++ b/libavutil/x86/x86inc.asm @@ -1408,22 +1408,16 @@ AVX_INSTR pfmul, 1, 0, 1 %undef j %macro FMA_INSTR 3 - %macro %1 5-8 %1, %2, %3 - %if cpuflag(xop) || cpuflag(fma4) - v%6 %1, %2, %3, %4 + %macro %1 4-7 %1, %2, %3 + %if cpuflag(xop) + v%5 %1, %2, %3, %4 %else - %ifidn %1, %4 - %7 %5, %2, %3 - %8 %1, %4, %5 - %else - %7 %1, %2, %3 - %8 %1, %4 - %endif + %6 %1, %2, %3 + %7 %1, %4 %endif %endmacro %endmacro -FMA_INSTR fmaddps, mulps, addps FMA_INSTR pmacsdd, pmulld, paddd FMA_INSTR pmacsww, pmullw, paddw FMA_INSTR pmadcswd, pmaddwd, paddd diff --git a/libavutil/x86/x86util.asm b/libavutil/x86/x86util.asm index 8908444950..01f306831c 100644 --- a/libavutil/x86/x86util.asm +++ b/libavutil/x86/x86util.asm @@ -665,3 +665,14 @@ psrad %1, 16 %endif %endmacro + +; Wrapper for non-FMA version of fmaddps +%macro FMULADD_PS 5 + %ifidn %1, %4 + mulps %5, %2, %3 + addps %1, %4, %5 + %else + mulps %1, %2, %3 + addps %1, %4 + %endif +%endmacro |