summaryrefslogtreecommitdiff
path: root/apps/codecs/libmad
diff options
context:
space:
mode:
authorMagnus Holmgren <magnushol@gmail.com>2005-09-28 17:36:42 +0000
committerMagnus Holmgren <magnushol@gmail.com>2005-09-28 17:36:42 +0000
commit58384f03fb0c46eb642d7a8af9c32c0ecd91ad25 (patch)
tree3cf7135688c29d2a7d295c9941dd097656bb94a1 /apps/codecs/libmad
parent9d256dc4b0175af15ac693fe80ca145b89329d8a (diff)
downloadrockbox-58384f03fb0c46eb642d7a8af9c32c0ecd91ad25.tar.gz
rockbox-58384f03fb0c46eb642d7a8af9c32c0ecd91ad25.zip
iRiver: Make it possible to build Rockbox using GCC 4.0.1.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7569 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libmad')
-rw-r--r--apps/codecs/libmad/synth.c36
1 files changed, 35 insertions, 1 deletions
diff --git a/apps/codecs/libmad/synth.c b/apps/codecs/libmad/synth.c
index 4315e239e8..1b13312caf 100644
--- a/apps/codecs/libmad/synth.c
+++ b/apps/codecs/libmad/synth.c
@@ -643,6 +643,40 @@ void synth_full(struct mad_synth *synth, struct mad_frame const *frame,
643 ++Dptr; 643 ++Dptr;
644 644
645 /* D[32 - sb][i] == -D[sb][31 - i] */ 645 /* D[32 - sb][i] == -D[sb][31 - i] */
646#if __GNUC__ >= 4
647 /* GCC 4.0.1 can't find a suitable register here if all of d0-d7
648 * are clobbered, so use fewer registers. It does mean two extra
649 * movem instructions, but should have no additional performance
650 * impact (like not being able to use burst mode for the movem).
651 */
652 asm volatile (
653 "movem.l (%1), %%d0-%%d3\n\t"
654 "move.l (%2), %%a5\n\t"
655 "msac.l %%d0, %%a5, 56(%2), %%a5, %%acc0\n\t"
656 "msac.l %%d1, %%a5, 48(%2), %%a5, %%acc0\n\t"
657 "msac.l %%d2, %%a5, 40(%2), %%a5, %%acc0\n\t"
658 "msac.l %%d3, %%a5, 32(%2), %%a5, %%acc0\n\t"
659 "movem.l 16(%1), %%d0-%%d3\n\t"
660 "msac.l %%d0, %%a5, 24(%2), %%a5, %%acc0\n\t"
661 "msac.l %%d1, %%a5, 16(%2), %%a5, %%acc0\n\t"
662 "msac.l %%d2, %%a5, 8(%2), %%a5, %%acc0\n\t"
663 "msac.l %%d3, %%a5, 8(%4), %%a5, %%acc0\n\t"
664
665 "movem.l 16(%3), %%d0-%%d3\n\t"
666 "mac.l %%d3, %%a5, 16(%4), %%a5, %%acc0\n\t"
667 "mac.l %%d2, %%a5, 24(%4), %%a5, %%acc0\n\t"
668 "mac.l %%d1, %%a5, 32(%4), %%a5, %%acc0\n\t"
669 "mac.l %%d0, %%a5, 40(%4), %%a5, %%acc0\n\t"
670 "movem.l (%3), %%d0-%%d3\n\t"
671 "mac.l %%d3, %%a5, 48(%4), %%a5, %%acc0\n\t"
672 "mac.l %%d2, %%a5, 56(%4), %%a5, %%acc0\n\t"
673 "mac.l %%d1, %%a5, (%4), %%a5, %%acc0\n\t"
674 "mac.l %%d0, %%a5, %%acc0\n\t"
675 "movclr.l %%acc0, %0\n\t"
676 : "=r" (hi)
677 : "a" (*fo), "a" (*Dptr + po), "a" (*fe), "a" (*Dptr + pe)
678 : "d0", "d1", "d2", "d3", "a5");
679#else
646 asm volatile ( 680 asm volatile (
647 "movem.l (%1), %%d0-%%d7\n\t" 681 "movem.l (%1), %%d0-%%d7\n\t"
648 "move.l (%2), %%a5\n\t" 682 "move.l (%2), %%a5\n\t"
@@ -668,7 +702,7 @@ void synth_full(struct mad_synth *synth, struct mad_frame const *frame,
668 : "=r" (hi) 702 : "=r" (hi)
669 : "a" (*fo), "a" (*Dptr + po), "a" (*fe), "a" (*Dptr + pe) 703 : "a" (*fo), "a" (*Dptr + po), "a" (*fe), "a" (*Dptr + pe)
670 : "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "a5"); 704 : "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "a5");
671 705#endif
672 *pcm1++ = hi << 3; 706 *pcm1++ = hi << 3;
673 707
674 asm volatile( 708 asm volatile(