From 3c52395b570d5abc394b5a1320d642057e6f4174 Mon Sep 17 00:00:00 2001 From: Dave Hooper Date: Sun, 21 Feb 2010 21:14:40 +0000 Subject: Get a few more % speedup on ARM (measured on ipod video) - improve imdct full final symmetries using ldm/stm and simple register swapping. Also, add more comments (and improve/update some of the existing ones) regarding the layout of the imdct_half and the imdct_full git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24819 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/lib/asm_arm.h | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'apps/codecs/lib/asm_arm.h') diff --git a/apps/codecs/lib/asm_arm.h b/apps/codecs/lib/asm_arm.h index 4f31f80c3e..9dcbcef755 100644 --- a/apps/codecs/lib/asm_arm.h +++ b/apps/codecs/lib/asm_arm.h @@ -226,14 +226,11 @@ void vect_mult_bw(int32_t *data, int32_t *window, int n) #define _V_CLIP_MATH static inline int32_t CLIP_TO_15(int32_t x) { - int tmp; - asm volatile("subs %1, %0, #32768\n\t" - "movpl %0, #0x7f00\n\t" - "orrpl %0, %0, #0xff\n" - "adds %1, %0, #32768\n\t" - "movmi %0, #0x8000" - : "+r"(x),"=r"(tmp) - : + const int32_t mask = 0xffff7fff; + asm volatile("teq %0,%0,asr #31\n\t" + "eorne %0,%1,%0,asr #31\n\t" + : "+r"(x) + : "r" (mask) : "cc"); return(x); } -- cgit v1.2.3