[FFmpeg-cvslog] r15781 - trunk/libavcodec/armv4l/mathops.h

mru subversion
Thu Nov 6 02:33:24 CET 2008


Author: mru
Date: Thu Nov  6 02:33:23 2008
New Revision: 15781

Log:
ARM: change MULH() macro to inline function

Modified:
   trunk/libavcodec/armv4l/mathops.h

Modified: trunk/libavcodec/armv4l/mathops.h
==============================================================================
--- trunk/libavcodec/armv4l/mathops.h	(original)
+++ trunk/libavcodec/armv4l/mathops.h	Thu Nov  6 02:33:23 2008
@@ -39,6 +39,7 @@ static inline av_const int MULL(int a, i
 }
 #endif
 
+#define MULH MULH
 #ifdef HAVE_ARMV6
 static inline av_const int MULH(int a, int b)
 {
@@ -46,12 +47,13 @@ static inline av_const int MULH(int a, i
     __asm__ ("smmul %0, %1, %2" : "=r"(r) : "r"(a), "r"(b));
     return r;
 }
-#define MULH MULH
 #else
-#define MULH(a, b) \
-    ({ int lo, hi;\
-     __asm__ ("smull %0, %1, %2, %3" : "=&r"(lo), "=&r"(hi) : "r"(b), "r"(a));\
-     hi; })
+static inline av_const int MULH(int a, int b)
+{
+    int lo, hi;
+    __asm__ ("smull %0, %1, %2, %3" : "=&r"(lo), "=&r"(hi) : "r"(b), "r"(a));
+    return hi;
+}
 #endif
 
 static inline av_const int64_t MUL64(int a, int b)




More information about the ffmpeg-cvslog mailing list