diff options
author | Christophe Gisquet <christophe.gisquet@gmail.com> | 2014-06-15 01:05:03 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-06-15 13:19:27 +0200 |
commit | 91076128185e96725af18e1b532c6060e7f0c150 (patch) | |
tree | 066a5bfac549b5b6d7e90358593e18041282b232 /libavutil/x86 | |
parent | 2a1158ff3b29461f944ee358963105de4d98d63c (diff) | |
download | ffmpeg-91076128185e96725af18e1b532c6060e7f0c150.tar.gz |
x86util: add and use RSHIFT/LSHIFT macros
Those macros take a byte number as shift argument, as this argument
differs between MMX and SSE2 instructions.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/x86')
-rw-r--r-- | libavutil/x86/x86util.asm | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libavutil/x86/x86util.asm b/libavutil/x86/x86util.asm index 1064e9a25c..9fb4778547 100644 --- a/libavutil/x86/x86util.asm +++ b/libavutil/x86/x86util.asm @@ -743,3 +743,19 @@ PMA_EMU PMADCSWD, pmadcswd, pmaddwd, paddd addps %1, %4 %endif %endmacro + +%macro LSHIFT 2 +%if mmsize > 8 + pslldq %1, %2 +%else + psllq %1, 8*(%2) +%endif +%endmacro + +%macro RSHIFT 2 +%if mmsize > 8 + psrldq %1, %2 +%else + psrlq %1, 8*(%2) +%endif +%endmacro |