diff options
author | Dave Hooper <dave@beermex.com> | 2010-02-21 21:17:53 +0000 |
---|---|---|
committer | Dave Hooper <dave@beermex.com> | 2010-02-21 21:17:53 +0000 |
commit | 0b5338a6e9097c98223ea1e06b962b1cc78ea57b (patch) | |
tree | 5f59e52046d57009ae20fa418d87f87577afd77b /apps/codecs/lib/asm_arm.h | |
parent | 3c52395b570d5abc394b5a1320d642057e6f4174 (diff) | |
download | rockbox-0b5338a6e9097c98223ea1e06b962b1cc78ea57b.tar.gz rockbox-0b5338a6e9097c98223ea1e06b962b1cc78ea57b.zip |
Eep, didn't mean to commit those other files
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24820 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/lib/asm_arm.h')
-rw-r--r-- | apps/codecs/lib/asm_arm.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/apps/codecs/lib/asm_arm.h b/apps/codecs/lib/asm_arm.h index 9dcbcef755..4f31f80c3e 100644 --- a/apps/codecs/lib/asm_arm.h +++ b/apps/codecs/lib/asm_arm.h | |||
@@ -226,11 +226,14 @@ void vect_mult_bw(int32_t *data, int32_t *window, int n) | |||
226 | #define _V_CLIP_MATH | 226 | #define _V_CLIP_MATH |
227 | 227 | ||
228 | static inline int32_t CLIP_TO_15(int32_t x) { | 228 | static inline int32_t CLIP_TO_15(int32_t x) { |
229 | const int32_t mask = 0xffff7fff; | 229 | int tmp; |
230 | asm volatile("teq %0,%0,asr #31\n\t" | 230 | asm volatile("subs %1, %0, #32768\n\t" |
231 | "eorne %0,%1,%0,asr #31\n\t" | 231 | "movpl %0, #0x7f00\n\t" |
232 | : "+r"(x) | 232 | "orrpl %0, %0, #0xff\n" |
233 | : "r" (mask) | 233 | "adds %1, %0, #32768\n\t" |
234 | "movmi %0, #0x8000" | ||
235 | : "+r"(x),"=r"(tmp) | ||
236 | : | ||
234 | : "cc"); | 237 | : "cc"); |
235 | return(x); | 238 | return(x); |
236 | } | 239 | } |