x86: Refactor PSWAPD fallback implementations and port to cpuflags

This commit is contained in:
Diego Biurrun
2012-08-02 00:55:34 +02:00
parent 9a07c1332c
commit 0a7a94f2e5
3 changed files with 16 additions and 29 deletions

View File

@ -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