Commit a9f63a85 authored by mru's avatar mru

fix ARMv6 FASTDIV for divisor <=2

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@14481 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 9a238ee8
......@@ -150,7 +150,10 @@ extern const uint32_t ff_inverse[256];
static inline av_const int FASTDIV(int a, int b)
{
int r;
asm volatile("smmul %0, %1, %2" : "=r"(r) : "r"(a), "r"(ff_inverse[b]));
asm volatile("cmp %2, #0 \n\t"
"smmul %0, %1, %2 \n\t"
"rsblt %0, %0, #0 \n\t"
: "=r"(r) : "r"(a), "r"(ff_inverse[b]));
return r;
}
#elif defined(ARCH_ARMV4L)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment