diff options
-rw-r--r-- | apps/plugins/mandelbrot.c | 19 | ||||
-rw-r--r-- | apps/recorder/resize.h | 11 |
2 files changed, 14 insertions, 16 deletions
diff --git a/apps/plugins/mandelbrot.c b/apps/plugins/mandelbrot.c index c69d5de125..c18b1f453a 100644 --- a/apps/plugins/mandelbrot.c +++ b/apps/plugins/mandelbrot.c | |||
@@ -415,14 +415,13 @@ static inline long muls32_asr26(long a, long b) | |||
415 | "addc %[t2],%[t3] \n" /* t3 += t2, carry -> t2 */ | 415 | "addc %[t2],%[t3] \n" /* t3 += t2, carry -> t2 */ |
416 | "movt %[t2] \n" | 416 | "movt %[t2] \n" |
417 | "mulu %[a],%[b] \n" /* b * d */ | 417 | "mulu %[a],%[b] \n" /* b * d */ |
418 | "mov %[t3],%[t1] \n" /* t2t3 <<= 16 */ | 418 | "mov %[t3],%[t1] \n" /* t1t3 = t2t3 << 16 */ |
419 | "xtrct %[t2],%[t1] \n" | 419 | "xtrct %[t2],%[t1] \n" |
420 | "mov %[t1],%[t2] \n" | ||
421 | "shll16 %[t3] \n" | 420 | "shll16 %[t3] \n" |
422 | "sts macl,%[t1] \n" /* lo = b * d */ | 421 | "sts macl,%[t2] \n" /* lo = b * d */ |
423 | "clrt \n" /* hi.lo += t2t3 */ | 422 | "clrt \n" /* hi.lo += t1t3 */ |
424 | "addc %[t3],%[t1] \n" | 423 | "addc %[t3],%[t2] \n" |
425 | "addc %[t2],%[r] \n" | 424 | "addc %[t1],%[r] \n" |
426 | "cmp/pz %[a] \n" /* ab >= 0 ? */ | 425 | "cmp/pz %[a] \n" /* ab >= 0 ? */ |
427 | "bt 1f \n" | 426 | "bt 1f \n" |
428 | "sub %[b],%[r] \n" /* no: hi -= cd (sign extension of ab is -1) */ | 427 | "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) | |||
435 | "shll2 %[r] \n" /* hi <<= 6 */ | 434 | "shll2 %[r] \n" /* hi <<= 6 */ |
436 | "shll2 %[r] \n" | 435 | "shll2 %[r] \n" |
437 | "shll2 %[r] \n" | 436 | "shll2 %[r] \n" |
438 | "shlr16 %[t1] \n" /* (unsigned)lo >>= 26 */ | 437 | "shlr16 %[t2] \n" /* (unsigned)lo >>= 26 */ |
439 | "shlr8 %[t1] \n" | 438 | "shlr8 %[t2] \n" |
440 | "shlr2 %[t1] \n" | 439 | "shlr2 %[t2] \n" |
441 | "or %[t1],%[r] \n" /* combine result */ | 440 | "or %[t2],%[r] \n" /* combine result */ |
442 | : /* outputs */ | 441 | : /* outputs */ |
443 | [r] "=&r"(r), | 442 | [r] "=&r"(r), |
444 | [t1]"=&r"(t1), | 443 | [t1]"=&r"(t1), |
diff --git a/apps/recorder/resize.h b/apps/recorder/resize.h index d1dabaae09..4ea4eaa9a0 100644 --- a/apps/recorder/resize.h +++ b/apps/recorder/resize.h | |||
@@ -78,14 +78,13 @@ static inline unsigned sc_mul32(unsigned a, unsigned b) | |||
78 | "addc %[t2], %[t3] \n" /* t3 += t2, carry -> t2 */ | 78 | "addc %[t2], %[t3] \n" /* t3 += t2, carry -> t2 */ |
79 | "movt %[t2] \n" | 79 | "movt %[t2] \n" |
80 | "mulu %[a], %[b] \n" /* b * d */ | 80 | "mulu %[a], %[b] \n" /* b * d */ |
81 | "mov %[t3], %[t1] \n" /* t2t3 <<= 16 */ | 81 | "mov %[t3], %[t1] \n" /* t1t3 = t2t3 << 16 */ |
82 | "xtrct %[t2], %[t1] \n" | 82 | "xtrct %[t2], %[t1] \n" |
83 | "mov %[t1], %[t2] \n" | ||
84 | "shll16 %[t3] \n" | 83 | "shll16 %[t3] \n" |
85 | "sts macl, %[t1] \n" /* lo = b * d */ | 84 | "sts macl, %[t2] \n" /* lo = b * d */ |
86 | "clrt \n" /* hi.lo += t2t3 */ | 85 | "clrt \n" /* hi.lo += t1t3 */ |
87 | "addc %[t3], %[t1] \n" | 86 | "addc %[t3], %[t2] \n" |
88 | "addc %[t2], %[r] \n" | 87 | "addc %[t1], %[r] \n" |
89 | : /* outputs */ | 88 | : /* outputs */ |
90 | [r] "=&r"(r), | 89 | [r] "=&r"(r), |
91 | [t1]"=&r"(t1), | 90 | [t1]"=&r"(t1), |