[Top][All Lists]

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

Re: [avr-gcc-list] stack layout

From: E. Weddington
Subject: Re: [avr-gcc-list] stack layout
Date: Tue, 28 Jun 2005 16:01:17 -0600
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

Marek Michalkiewicz wrote:

On Mon, Jun 27, 2005 at 11:03:36AM +0200, Haase Bjoern (PT-BEU/EMT) * wrote:

I am presently re-implementing prologue/epilogue by RTL instead of text. I 
thought about posting it this week-end but weather was too fine and It will 
probably still take a couple of days in order to make sure, that also the 
TINY_STACK and NO_INTERRUPT cases are not broken. When doing this, I could 
implement the change of the status of the main function right away.?

I think it may be best to do it all in this order:

1. Change gcrt1.S in avr-libc to call main() instead of jumping to it;
  after main() returns, call exit().  I believe this should still be
  backwards-compatible with stable versions of GCC (where main() never
  returns, but jumps directly to exit() instead).
2. Implement the "OS_Task" function attribute (see the h8300 target;
  in IAR C it's called "__C_task" and you can see it in code examples
  found in some Atmel's app notes).  Applications should specify this
  for main(), to avoid unnecessary saving of call-saved registers.
3. Remove special handling of main().  This should simplify the function
  prologue/epilogue logic, making the next step easier.  After that,
  GCC will require the updated avr-libc (with change from step 1).
4. Finally, implement prologue/epilogue as RTL instead of text.

Hi All,

I'm not familiar with the internal details of the toolset, but I was wondering: is there a particular reason why #4 has to go after all the rest? Does it interfere at all with #1-#3?


reply via email to

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