[x264-devel] x86inc: create xm# and ym#, analagous to m#
Loren Merritt
git at videolan.org
Tue Apr 23 23:37:07 CEST 2013
x264 | branch: master | Loren Merritt <pengvado at akuvian.org> | Mon Feb 25 21:16:45 2013 +0000| [e228f65488b02967bc450bbe3b92ac44eb0088d7] | committer: Jason Garrett-Glaser
x86inc: create xm# and ym#, analagous to m#
For when we want to mix simd sizes within one function.
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=e228f65488b02967bc450bbe3b92ac44eb0088d7
---
common/x86/x86inc.asm | 26 +++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/common/x86/x86inc.asm b/common/x86/x86inc.asm
index ea3371e..bd85eb4 100644
--- a/common/x86/x86inc.asm
+++ b/common/x86/x86inc.asm
@@ -785,7 +785,11 @@ SECTION .note.GNU-stack noalloc noexec nowrite progbits
%endif
%endmacro
-; merge mmx and sse*
+; Merge mmx and sse*
+; m# is a simd regsiter of the currently selected size
+; xm# is the corresponding xmmreg (if selcted xmm or ymm size), or mmreg (if selected mmx)
+; ym# is the corresponding ymmreg (if selcted xmm or ymm size), or mmreg (if selected mmx)
+; (All 3 remain in sync through SWAP.)
%macro CAT_XDEFINE 3
%xdefine %1%2 %3
@@ -862,6 +866,26 @@ SECTION .note.GNU-stack noalloc noexec nowrite progbits
INIT_XMM
+%macro DECLARE_MMCAST 1
+ %define mmmm%1 mm%1
+ %define mmxmm%1 mm%1
+ %define mmymm%1 mm%1
+ %define xmmmm%1 mm%1
+ %define xmmxmm%1 xmm%1
+ %define xmmymm%1 xmm%1
+ %define ymmmm%1 mm%1
+ %define ymmxmm%1 ymm%1
+ %define ymmymm%1 ymm%1
+ %define xm%1 xmm %+ m%1
+ %define ym%1 ymm %+ m%1
+%endmacro
+
+%assign i 0
+%rep 16
+ DECLARE_MMCAST i
+%assign i i+1
+%endrep
+
; I often want to use macros that permute their arguments. e.g. there's no
; efficient way to implement butterfly or transpose or dct without swapping some
; arguments.
More information about the x264-devel
mailing list