This is the mail archive of the mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Building toolchain with Cirrus Logic MaverickCrunch support

On Wed, 19 Jan 2005 20:40:06 -0800, Dan Kegel <> wrote:
> Grant Likely wrote:
> > I noticed in the GCC 3.4 release notes that gcc now support the
> > MaverickCrunch engine on the Cirrus Logic EP93XX ARM920T devices.  It
> > also says that multilib support can be enabled for this part by
> > editing "gcc/config/arm/t-arm-elf".
> >
> > However, I understand that crosstool disables multilib so if I want to
> > use the MaverickCrunch support in libgcc then I need to build a new
> > crosstool target.
> >
> > I decided to use and arm9tdmi.dat as a starting point
> > for the EP9312 build so I copied them to and
> > arm-ep9312.dat.  (I've attached the patch)
> >
> > The toolchain compiled, and it appears to be building code with crunch
> > instructions; could somebody please take a look at what I've done and
> > let me know if I'm doing things right?
> Looks reasonable to me (though you can delete the lines from
> for gccs older than 3.4).  Now the question is, do the programs it
> generates run on an ep9312 system?  Anyone have one to test on?
> - Dan

I've now gotten a Linux kernel w/ crunch support to run on my eval
board so I've been able to confirm that the arm-ep9312-linux-gnu
toolchain does generate runnable code.  A simple test of floating
point instructions confirms that the crunch engine is getting used (as
much as a 30x speedup over arm-9tdmi toolchain compiled version).

Unfortunatly not all applications work correctly.  ubench compiled
with crunch support segfaults immediately.  Looking at the cirrus
errata there are quite a few issues with the crunch engine in current
silicon.  I don't know if those issues are addressed in gcc 3.4.2.

I've attached my test program.

#include <time.h>
#include <stdio.h>


typedef unsigned short u16;
typedef float audio_sample_t;

void mix(audio_sample_t *src, audio_sample_t *dest, int len,
         audio_sample_t multiplier)
	audio_sample_t *src_end;

	src_end = src + len;
	while (src < src_end)
		*dest++ += *src++ * multiplier;

void test_mixing_bandwidth(int delay)
	time_t end_time;
	int i = 0;

	audio_sample_t  mixbuffer[SAMPLE_BUFFER_SIZE*256];
	audio_sample_t  samplebuffer[SAMPLE_BUFFER_SIZE];

	end_time = time(NULL) + delay;

	while (time(NULL) < end_time)
		mix(samplebuffer, mixbuffer, SAMPLE_BUFFER_SIZE, 2);

	printf("Processed %i audio frames in %i seconds (%i KB/s)\n",
	       i*SAMPLE_BUFFER_SIZE, delay,

int main(int argc, char **argv)
	/* main loop goes here */

Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]