From 5750d6c5e9d184488f4dc0f9e81cbcc28cb2f2d1 Mon Sep 17 00:00:00 2001 From: James Almer Date: Mon, 3 Aug 2015 03:28:37 -0300 Subject: x86: move XOP emulation code back to x86inc Only two functions that use xop multiply-accumulate instructions where the first operand is the same as the fourth actually took advantage of the macros. This further reduces differences with x264's x86inc. Reviewed-by: Ronald S. Bultje Signed-off-by: James Almer --- libswresample/x86/resample.asm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'libswresample/x86') diff --git a/libswresample/x86/resample.asm b/libswresample/x86/resample.asm index a57ff37bb9..4989aa6991 100644 --- a/libswresample/x86/resample.asm +++ b/libswresample/x86/resample.asm @@ -176,7 +176,12 @@ cglobal resample_common_%1, 1, 7, 2, ctx, phase_shift, dst, frac, \ .inner_loop: movu m1, [srcq+min_filter_count_x4q*1] %ifidn %1, int16 - PMADCSWD m0, m1, [filterq+min_filter_count_x4q*1], m0, m1 +%if cpuflag(xop) + vpmadcswd m0, m1, [filterq+min_filter_count_x4q*1], m0 +%else + pmaddwd m1, [filterq+min_filter_count_x4q*1] + paddd m0, m1 +%endif %else ; float/double %if cpuflag(fma4) || cpuflag(fma3) fmaddp%4 m0, m1, [filterq+min_filter_count_x4q*1], m0 -- cgit v1.2.3