aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2008-11-06 01:33:23 +0000
committerMåns Rullgård <mans@mansr.com>2008-11-06 01:33:23 +0000
commit73c1c96b8343bff0cbe69a08ef5403de3983fb68 (patch)
treebf1484af6c7c3a5cd572250cc264df1c012207c3
parent8f4d0d48b9cb995bae3b26efc2ab270609a03e8b (diff)
downloadffmpeg-73c1c96b8343bff0cbe69a08ef5403de3983fb68.tar.gz
ARM: change MULH() macro to inline function
Originally committed as revision 15781 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/armv4l/mathops.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/libavcodec/armv4l/mathops.h b/libavcodec/armv4l/mathops.h
index c30ab3391e..9f3076ba40 100644
--- a/libavcodec/armv4l/mathops.h
+++ b/libavcodec/armv4l/mathops.h
@@ -39,6 +39,7 @@ static inline av_const int MULL(int a, int b)
}
#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, int b)
__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)