From 91076128185e96725af18e1b532c6060e7f0c150 Mon Sep 17 00:00:00 2001 From: Christophe Gisquet Date: Sun, 15 Jun 2014 01:05:03 +0200 Subject: 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 --- libavutil/x86/x86util.asm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'libavutil/x86/x86util.asm') 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 -- cgit v1.2.3