avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [avr-gcc-list] Gcc bug??


From: Brian Cuthie
Subject: RE: [avr-gcc-list] Gcc bug??
Date: Wed, 10 Mar 2004 12:16:13 -0500

Yup. My bad. Already changed tasks to NORETURN but didn't do the same for
interrupt handlers.

Seems to me, though, since you can ensure when the C compiler will and will
not use a frame pointer that using NAKED is risky, at best.

Thanks everyone.

-brian 

> -----Original Message-----
> From: address@hidden 
> [mailto:address@hidden On Behalf Of Larry Barello
> Sent: Wednesday, March 10, 2004 11:40 AM
> To: address@hidden
> Subject: RE: [avr-gcc-list] Gcc bug??
> 
> This is not a GCC bug.  Brian is using AvrX which uses the 
> "naked" attribute for all AvrX code objects.  Naked functions 
> do not initialize the frame pointer.  The right solution is 
> to change "naked" to "noreturn" which is slightly less 
> efficient, but *does* initialize the frame pointer.
> 
> Brian already knows this (or at least his inbox does)...
> 
> -----Original Message-----
> From:  Brian Cuthie
> Sent: Wednesday, March 10, 2004 7:31 AM
> To: address@hidden
> Subject: [avr-gcc-list] Gcc bug??
> 
> 
> 
> I've got an interrupt handler that contains a switch 
> statement. With -O optimization, it seems to work fine. 
> Without any optimization (no -O) the whole machine crashes 
> within seconds.  Looking at the code generated by the 
> compiler, I'm puzzled over how the unoptimized version could 
> ever work.
> 
> Here's the beginning of the optimized version of the 
> interrupt handler (this is unlinked, so absolute addresses are null):
> ...
> 
> 
> _______________________________________________
> avr-gcc-list mailing list
> address@hidden
> http://www.avr1.org/mailman/listinfo/avr-gcc-list
> 


_______________________________________________
avr-gcc-list mailing list
address@hidden
http://www.avr1.org/mailman/listinfo/avr-gcc-list


reply via email to

[Prev in Thread] Current Thread [Next in Thread]