From 0a7a94f2e53bcdb8ac5857eb8c67c16f6f1d0f2f Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Thu, 2 Aug 2012 00:55:34 +0200 Subject: x86: Refactor PSWAPD fallback implementations and port to cpuflags --- libavutil/x86/x86util.asm | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'libavutil/x86') diff --git a/libavutil/x86/x86util.asm b/libavutil/x86/x86util.asm index ca0041acf7..9183d38595 100644 --- a/libavutil/x86/x86util.asm +++ b/libavutil/x86/x86util.asm @@ -319,6 +319,18 @@ %endif %endmacro +%macro PSWAPD 2 +%if cpuflag(mmxext) + pshufw %1, %2, q1032 +%elif cpuflag(3dnowext) + pswapd %1, %2 +%elif cpuflag(3dnow) + movq %1, %2 + psrlq %1, 32 + punpckldq %1, %2 +%endif +%endmacro + %macro DEINTB 5 ; mask, reg1, mask, reg2, optional src to fill masks from %ifnum %5 pand m%3, m%5, m%4 ; src .. y6 .. y4 -- cgit v1.2.3