avr-libc-dev
[Top][All Lists]
Advanced

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

Re: [avr-libc-dev] Re: snprintf bug ?


From: Björn Haase
Subject: Re: [avr-libc-dev] Re: snprintf bug ?
Date: Fri, 14 Oct 2005 19:27:52 +0200
User-agent: KMail/1.7.1

Dmitry K. wrote on Freitag, 14. Oktober 2005 05:23 :
> On Thursday 13 October 2005 21:46, Russell Strong wrote:
>    You have exclude frame pointer (r28/r29) initialization
> by defining 'naked' for main.
>    But with automatic string 'heading_tmp' this is not work:
> frame pointer is used as base address.  Result is writing
> to random place.  With static string all works:
> address is absolute.
When looking at this discussion, I'd like to conclude that one might have the 
whish to implement frame pointer adjustment for local variables (if stack 
slots are needed) even for "naked" functions.? One other option would be 
todefine a new "bikini" attribute?

The attribute 'bikini' then would only mean: "this function does not safe or 
restore any register and does never return.

Background is, that when changing the prologue for "main" the way Marek has 
suggested a couple of weeks ago, 'main' would become a normal function. Marek 
suggested to use the attribute 'naked' in order to avoid the unnecessary 
safes/restores. For cases like this one, however, we then would be having 
problems.

Bjoern.




reply via email to

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