x86: SPLATD: port to cpuflags

This commit is contained in:
Diego Biurrun
2012-07-15 18:33:59 +02:00
parent 1c5805521c
commit 87af05c575
4 changed files with 7 additions and 22 deletions

View File

@@ -574,24 +574,14 @@
%endif
%endmacro
%macro SPLATD 2-3 0
%if mmsize == 16
pshufd %1, %2, (%3)*0x55
%else
pshufw %1, %2, (%3)*0x11 + ((%3)+1)*0x44
%endif
%endmacro
%macro SPLATD_MMX 1
%macro SPLATD 1
%if mmsize == 8
punpckldq %1, %1
%endmacro
%macro SPLATD_SSE 1
shufps %1, %1, 0
%endmacro
%macro SPLATD_SSE2 1
%elif cpuflag(sse2)
pshufd %1, %1, 0
%elif cpuflag(sse)
shufps %1, %1, 0
%endif
%endmacro
%macro CLIPW 3 ;(dst, min, max)