diff armv4l/mathops.h @ 8112:954dd6e341ce libavcodec

ARM: change MULL() macro to inline function
author mru
date Thu, 06 Nov 2008 01:33:20 +0000
parents 97b08ce5d507
children aa55fd152068
line wrap: on
line diff
--- a/armv4l/mathops.h	Thu Nov 06 01:33:17 2008 +0000
+++ b/armv4l/mathops.h	Thu Nov 06 01:33:20 2008 +0000
@@ -26,14 +26,17 @@
 #include "libavutil/common.h"
 
 #ifdef FRAC_BITS
-#   define MULL(a, b) \
-        ({  int lo, hi;\
-         __asm__("smull %0, %1, %2, %3     \n\t"\
-             "mov   %0, %0,     lsr %4\n\t"\
-             "add   %1, %0, %1, lsl %5\n\t"\
-             : "=&r"(lo), "=&r"(hi)\
-             : "r"(b), "r"(a), "i"(FRAC_BITS), "i"(32-FRAC_BITS));\
-         hi; })
+#   define MULL MULL
+static inline av_const int MULL(int a, int b)
+{
+    int lo, hi;
+    __asm__("smull %0, %1, %2, %3     \n\t"
+            "mov   %0, %0,     lsr %4 \n\t"
+            "add   %1, %0, %1, lsl %5 \n\t"
+            : "=&r"(lo), "=&r"(hi)
+            : "r"(b), "r"(a), "i"(FRAC_BITS), "i"(32-FRAC_BITS));
+    return hi;
+}
 #endif
 
 #ifdef HAVE_ARMV6