diff options
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/mandelbrot.c | 19 |
1 files changed, 9 insertions, 10 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), |