diff options
author | Måns Rullgård <mans@mansr.com> | 2008-11-06 01:33:20 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2008-11-06 01:33:20 +0000 |
commit | 8f4d0d48b9cb995bae3b26efc2ab270609a03e8b (patch) | |
tree | c4909d5454ce031c85cc0348125236b811d180ce /libavcodec/armv4l/mathops.h | |
parent | 96dea17a1d9a2caffc3923b4721ff88ac2e72144 (diff) | |
download | ffmpeg-8f4d0d48b9cb995bae3b26efc2ab270609a03e8b.tar.gz |
ARM: change MULL() macro to inline function
Originally committed as revision 15780 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/armv4l/mathops.h')
-rw-r--r-- | libavcodec/armv4l/mathops.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/libavcodec/armv4l/mathops.h b/libavcodec/armv4l/mathops.h index 901cccb834..c30ab3391e 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 |