[FFmpeg-cvslog] ARM: improve FASTDIV asm
Mans Rullgard
git at videolan.org
Sun May 29 03:46:44 CEST 2011
ffmpeg | branch: master | Mans Rullgard <mans at mansr.com> | Fri May 27 21:43:15 2011 +0100| [a84f82560e3fa6aa41de64b0a5b75d1d607599aa] | committer: Mans Rullgard
ARM: improve FASTDIV asm
This uses one register less. Also add missing "cc" clobber.
Signed-off-by: Mans Rullgard <mans at mansr.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a84f82560e3fa6aa41de64b0a5b75d1d607599aa
---
libavutil/arm/intmath.h | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/libavutil/arm/intmath.h b/libavutil/arm/intmath.h
index cc3de90..4340b59 100644
--- a/libavutil/arm/intmath.h
+++ b/libavutil/arm/intmath.h
@@ -33,12 +33,12 @@
#define FASTDIV FASTDIV
static av_always_inline av_const int FASTDIV(int a, int b)
{
- int r, t;
- __asm__ ("cmp %3, #2 \n\t"
- "ldr %1, [%4, %3, lsl #2] \n\t"
- "lsrle %0, %2, #1 \n\t"
- "smmulgt %0, %1, %2 \n\t"
- : "=&r"(r), "=&r"(t) : "r"(a), "r"(b), "r"(ff_inverse));
+ int r;
+ __asm__ ("cmp %2, #2 \n\t"
+ "ldr %0, [%3, %2, lsl #2] \n\t"
+ "lsrle %0, %1, #1 \n\t"
+ "smmulgt %0, %0, %1 \n\t"
+ : "=&r"(r) : "r"(a), "r"(b), "r"(ff_inverse) : "cc");
return r;
}
More information about the ffmpeg-cvslog
mailing list