From: Måns Rullgård Date: Thu, 6 Nov 2008 01:33:20 +0000 (+0000) Subject: ARM: change MULL() macro to inline function X-Git-Tag: v0.5~2017 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8f4d0d48b9cb995bae3b26efc2ab270609a03e8b;p=platform%2Fupstream%2Flibav.git ARM: change MULL() macro to inline function Originally committed as revision 15780 to svn://svn.ffmpeg.org/ffmpeg/trunk --- diff --git a/libavcodec/armv4l/mathops.h b/libavcodec/armv4l/mathops.h index 901cccb..c30ab33 100644 --- a/libavcodec/armv4l/mathops.h +++ b/libavcodec/armv4l/mathops.h @@ -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