Mercurial > libavutil.hg
changeset 589:9dd4312d8a4d libavutil
ARM: make FASTDIV() an inline function
author | mru |
---|---|
date | Wed, 17 Dec 2008 20:04:39 +0000 |
parents | b27f233a4b3c |
children | e9d89a89561a |
files | internal.h |
diffstat | 1 files changed, 7 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/internal.h Wed Dec 17 00:54:54 2008 +0000 +++ b/internal.h Wed Dec 17 20:04:39 2008 +0000 @@ -149,16 +149,13 @@ 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