[En-Nut-Discussion] GCC optimizations

Coleman Brumley cbrumley at polarsoft.biz
Mon Mar 16 16:52:58 CET 2009


> > I'm just curious if anyone has run into issues using YAGARTO and
> various
> > optimization flags for GCC?  I have a very strange issue that could
> be
> > attributed to optimization, but I wanted to check to see if anyone
> else has
> > encountered any problems with their code.
> >
> 
> I think the backend is responsible for most optimizations, so this
> could really be arm specific. 

I'm not sure what you mean by the "backend is responsible...".  I'm certain
this is specific to the ARM7 code, and I have no way of testing on an AVR,
unfortunately.  

> What strange behavior are you seeing?
 
I'm seeing very strange things, like the generation of prefetch aborts and
data aborts when optimization is turned off.  When optimization is enabled
(-Os), then these aborts don't happen.  Unfortunately, sometime, it's vice
versa.  

> >
> > I'm using gcc v4.2.2 and binutils 2.18 in YAGARTO.
> >
> 
> Same here, but for AVR32. Works ok *most* of the time. Since AVR32
> toolchain is quite new, it has quite a number of bugs still. Of
> course, they are quite AVR32 specific. Sometimes I even get internal
> compiler errors, but they go away after a retry.

That's troubling news.  Do you feel this is something specific to YAGARTO?
Perhaps I should try a different ARM7 cross compiler to see if I get
different results?  Would the gcc built for Linux work any differently?  

I'm not sure how to even verify that would be the case or not.  I didn't
want to have to dig through assembly, but...

My H/W platform is based on the AT91SAM7X256.  Has anyone else had trouble
with the YAGARTO tools when working with this CPU?

Thanks for your response,
Coleman






More information about the En-Nut-Discussion mailing list