aboutsummaryrefslogtreecommitdiff
path: root/libavutil
diff options
context:
space:
mode:
authorMåns Rullgård2008-12-17 20:04:39 +0000
committerMåns Rullgård2008-12-17 20:04:39 +0000
commitf8c5adaf9c26b6aabfa2d9165e92857171c95fb6 (patch)
tree9a985736758897dcd064e33a6307580f24807ccf /libavutil
parent6c3fca647983a2bb47a79c82a9d797feac866a2f (diff)
ARM: make FASTDIV() an inline function
Originally committed as revision 16193 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/internal.h17
1 files changed, 7 insertions, 10 deletions
diff --git a/libavutil/internal.h b/libavutil/internal.h
index 5615c06c5f..535791a523 100644
--- a/libavutil/internal.h
+++ b/libavutil/internal.h
@@ -149,16 +149,13 @@ static inline av_const int FASTDIV(int a, int b)
return r;
}
#elif defined(ARCH_ARM)
-# define FASTDIV(a,b) \
- ({\
- int ret,dmy;\
- __asm__ volatile(\
- "umull %1, %0, %2, %3"\
- :"=&r"(ret),"=&r"(dmy)\
- :"r"(a),"r"(ff_inverse[b])\
- );\
- ret;\
- })
+static inline av_const int FASTDIV(int a, int b)
+{
+ int r, t;
+ __asm__ volatile ("umull %1, %0, %2, %3"
+ : "=&r"(r), "=&r"(t) : "r"(a), "r"(ff_inverse[b]));
+ return r;
+}
#elif defined(CONFIG_FASTDIV)
# define FASTDIV(a,b) ((uint32_t)((((uint64_t)a)*ff_inverse[b])>>32))
#else