This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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: show size of stack needed by functions


Eric Botcazou writes:

>> Output of -fstack-usage is not accurate
>> =======================================
>> 
>> This article mentions a "call cost":
>> https://mcuoneclipse.com/2015/08/21/gnu-static-stack-usage-analysis/
>> 
>> I checked for myself, by looking at the change of the stackpointer with a
>> debugger, and, yes, there seems to be a constant mismatch (2 bytes with
>> avr-gcc-5.3) between change of stack pointer and output of -fstack-usage.
>> In some rare cases there are more differences, which I didn't understand
>> yet.
>
> That's a bug, very likely in the AVR back-end, which must be fixed by someone 
> who knows the AVR architecture.

I'll take a look.

Regards
Senthil


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