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

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

Re: [avr-gcc-list] Weird optimization issue with avr-gcc 4.5.3, re "nake


From: Jan Waclawek
Subject: Re: [avr-gcc-list] Weird optimization issue with avr-gcc 4.5.3, re "naked."
Date: Fri, 27 Jan 2012 11:41:39 +0100

Johann: I could reproduce it with one of the 4.7 packages (an older one) you 
provided.

 ---

Moreover, in 4.7 it also stores the variable to stack frame even without naked, 
so that could be called a missed optimisation/regression.

 ---

As far as "code ineffiency" goes, while there is always a chance that 
investigating that some otherwise covered bug could be revealed, I would not 
put much effort in it - you are simply not supposed to use naked for C 
functions.

 --- 

Sligtly OT, but once you reacted:

>> 4. If you desire control over code size (and other aspects of the code too), 
>> resort to assembler.
>
>There is always that.  At the moment, optiboot is a "shining example"
>of how the C compiler can generate output almost as small as
>assembler, and "suitable for bootloaders" and such.

I never use the usual (and IMHO wrong) argument that assembler produces 
*smaller* code. Please note my wording.


Jan Waclawek





reply via email to

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