summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2009-02-15 23:13:26 +0000
committerJens Arnold <amiconn@rockbox.org>2009-02-15 23:13:26 +0000
commitd8ff94121fd855d86a10a4bb98ad426a3e119c20 (patch)
tree19eca173173d72541385308bc9399b7ad6de300f /apps
parent789b0a2eb9ae94a10abd590c91e3ae8588137e37 (diff)
downloadrockbox-d8ff94121fd855d86a10a4bb98ad426a3e119c20.zip
rockbox-d8ff94121fd855d86a10a4bb98ad426a3e119c20.tar.gz
rockbox-d8ff94121fd855d86a10a4bb98ad426a3e119c20.tar.bz2
rockbox-d8ff94121fd855d86a10a4bb98ad426a3e119c20.tar.xz
Get rid of a useless copy instruction in the SH1 32*32->64bit multiply routines (signed and unsigned).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20013 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/plugins/mandelbrot.c19
-rw-r--r--apps/recorder/resize.h11
2 files changed, 14 insertions, 16 deletions
diff --git a/apps/plugins/mandelbrot.c b/apps/plugins/mandelbrot.c
index c69d5de..c18b1f4 100644
--- a/apps/plugins/mandelbrot.c
+++ b/apps/plugins/mandelbrot.c
@@ -415,14 +415,13 @@ static inline long muls32_asr26(long a, long b)
"addc %[t2],%[t3] \n" /* t3 += t2, carry -> t2 */
"movt %[t2] \n"
"mulu %[a],%[b] \n" /* b * d */
- "mov %[t3],%[t1] \n" /* t2t3 <<= 16 */
+ "mov %[t3],%[t1] \n" /* t1t3 = t2t3 << 16 */
"xtrct %[t2],%[t1] \n"
- "mov %[t1],%[t2] \n"
"shll16 %[t3] \n"
- "sts macl,%[t1] \n" /* lo = b * d */
- "clrt \n" /* hi.lo += t2t3 */
- "addc %[t3],%[t1] \n"
- "addc %[t2],%[r] \n"
+ "sts macl,%[t2] \n" /* lo = b * d */
+ "clrt \n" /* hi.lo += t1t3 */
+ "addc %[t3],%[t2] \n"
+ "addc %[t1],%[r] \n"
"cmp/pz %[a] \n" /* ab >= 0 ? */
"bt 1f \n"
"sub %[b],%[r] \n" /* no: hi -= cd (sign extension of ab is -1) */
@@ -435,10 +434,10 @@ static inline long muls32_asr26(long a, long b)
"shll2 %[r] \n" /* hi <<= 6 */
"shll2 %[r] \n"
"shll2 %[r] \n"
- "shlr16 %[t1] \n" /* (unsigned)lo >>= 26 */
- "shlr8 %[t1] \n"
- "shlr2 %[t1] \n"
- "or %[t1],%[r] \n" /* combine result */
+ "shlr16 %[t2] \n" /* (unsigned)lo >>= 26 */
+ "shlr8 %[t2] \n"
+ "shlr2 %[t2] \n"
+ "or %[t2],%[r] \n" /* combine result */
: /* outputs */
[r] "=&r"(r),
[t1]"=&r"(t1),
diff --git a/apps/recorder/resize.h b/apps/recorder/resize.h
index d1dabaa..4ea4eaa 100644
--- a/apps/recorder/resize.h
+++ b/apps/recorder/resize.h
@@ -78,14 +78,13 @@ static inline unsigned sc_mul32(unsigned a, unsigned b)
"addc %[t2], %[t3] \n" /* t3 += t2, carry -> t2 */
"movt %[t2] \n"
"mulu %[a], %[b] \n" /* b * d */
- "mov %[t3], %[t1] \n" /* t2t3 <<= 16 */
+ "mov %[t3], %[t1] \n" /* t1t3 = t2t3 << 16 */
"xtrct %[t2], %[t1] \n"
- "mov %[t1], %[t2] \n"
"shll16 %[t3] \n"
- "sts macl, %[t1] \n" /* lo = b * d */
- "clrt \n" /* hi.lo += t2t3 */
- "addc %[t3], %[t1] \n"
- "addc %[t2], %[r] \n"
+ "sts macl, %[t2] \n" /* lo = b * d */
+ "clrt \n" /* hi.lo += t1t3 */
+ "addc %[t3], %[t2] \n"
+ "addc %[t1], %[r] \n"
: /* outputs */
[r] "=&r"(r),
[t1]"=&r"(t1),