ARM: make FASTDIV() an inline function

Originally committed as revision 16193 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Måns Rullgård 2008-12-17 20:04:39 +00:00
parent 6c3fca6479
commit f8c5adaf9c
1 changed files with 7 additions and 10 deletions

View File

@ -149,16 +149,13 @@ static inline av_const int FASTDIV(int a, int b)
return r; return r;
} }
#elif defined(ARCH_ARM) #elif defined(ARCH_ARM)
# define FASTDIV(a,b) \ static inline av_const int FASTDIV(int a, int b)
({\ {
int ret,dmy;\ int r, t;
__asm__ volatile(\ __asm__ volatile ("umull %1, %0, %2, %3"
"umull %1, %0, %2, %3"\ : "=&r"(r), "=&r"(t) : "r"(a), "r"(ff_inverse[b]));
:"=&r"(ret),"=&r"(dmy)\ return r;
:"r"(a),"r"(ff_inverse[b])\ }
);\
ret;\
})
#elif defined(CONFIG_FASTDIV) #elif defined(CONFIG_FASTDIV)
# define FASTDIV(a,b) ((uint32_t)((((uint64_t)a)*ff_inverse[b])>>32)) # define FASTDIV(a,b) ((uint32_t)((((uint64_t)a)*ff_inverse[b])>>32))
#else #else