[FFmpeg-cvslog] mathops: fix MULL() when the compiler does not inline the function.

Justin Ruggles git at videolan.org
Thu Mar 17 17:49:21 CET 2011


ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Tue Mar 15 20:38:23 2011 -0400| [79414257e23a0dee82a9978b5444ae8953376221] | committer: Justin Ruggles

mathops: fix MULL() when the compiler does not inline the function.

If the function is not inlined, an immmediate cannot be used for the
shift parameter, so the %cl register must be used instead in that case.

This fixes compilation for x86-32 using gcc with --disable-optimizations.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=79414257e23a0dee82a9978b5444ae8953376221
---

 libavcodec/x86/mathops.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/x86/mathops.h b/libavcodec/x86/mathops.h
index b183027..33d9a6c 100644
--- a/libavcodec/x86/mathops.h
+++ b/libavcodec/x86/mathops.h
@@ -35,7 +35,7 @@ static av_always_inline av_const int MULL(int a, int b, unsigned shift)
         "imull %3               \n\t"
         "shrdl %4, %%edx, %%eax \n\t"
         :"=a"(rt), "=d"(dummy)
-        :"a"(a), "rm"(b), "i"(shift)
+        :"a"(a), "rm"(b), "ci"((uint8_t)shift)
     );
     return rt;
 }




More information about the ffmpeg-cvslog mailing list