mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
ARM: improve FASTDIV asm
This uses one register less. Also add missing "cc" clobber. Signed-off-by: Mans Rullgard <mans@mansr.com>
This commit is contained in:
parent
7f7726c7a2
commit
a84f82560e
@ -33,12 +33,12 @@
|
|||||||
#define FASTDIV FASTDIV
|
#define FASTDIV FASTDIV
|
||||||
static av_always_inline av_const int FASTDIV(int a, int b)
|
static av_always_inline av_const int FASTDIV(int a, int b)
|
||||||
{
|
{
|
||||||
int r, t;
|
int r;
|
||||||
__asm__ ("cmp %3, #2 \n\t"
|
__asm__ ("cmp %2, #2 \n\t"
|
||||||
"ldr %1, [%4, %3, lsl #2] \n\t"
|
"ldr %0, [%3, %2, lsl #2] \n\t"
|
||||||
"lsrle %0, %2, #1 \n\t"
|
"lsrle %0, %1, #1 \n\t"
|
||||||
"smmulgt %0, %1, %2 \n\t"
|
"smmulgt %0, %0, %1 \n\t"
|
||||||
: "=&r"(r), "=&r"(t) : "r"(a), "r"(b), "r"(ff_inverse));
|
: "=&r"(r) : "r"(a), "r"(b), "r"(ff_inverse) : "cc");
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user