From 340d8245429db340d4e0dafb8633c4ac2bab2061 Mon Sep 17 00:00:00 2001 From: Thom Johansen Date: Thu, 3 Mar 2005 12:17:45 +0000 Subject: Added new coldfire assembly LPC decoder routine to libFLAC. Added clear accumulator policy. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6108 a1c6a512-1295-4272-9138-f99709370657 --- firmware/system.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'firmware') diff --git a/firmware/system.c b/firmware/system.c index 382a756..a457a13 100644 --- a/firmware/system.c +++ b/firmware/system.c @@ -419,6 +419,13 @@ void (* const vbr[]) (void) __attribute__ ((section (".vectors"))) = void system_init(void) { + /* Clear the accumulators. From here on it's the responsibility of + whoever uses them to clear them after use (use movclr instruction). */ + asm volatile ("movclr.l %%acc0, %%d0\n\t" + "movclr.l %%acc1, %%d0\n\t" + "movclr.l %%acc2, %%d0\n\t" + "movclr.l %%acc3, %%d0\n\t" + : : : "d0"); } void set_cpu_frequency (long) __attribute__ ((section (".icode"))); -- cgit v1.1