[Top][All Lists]

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

Re: [avr-gcc-list] ATmega2560 and r30/31 save in function prologue

From: Preston Wilson
Subject: Re: [avr-gcc-list] ATmega2560 and r30/31 save in function prologue
Date: Fri, 02 May 2008 15:40:01 -0400
User-agent: Microsoft-Entourage/

"Stu Bell" wrote:

> Hi all,
> I'm chasing down a problem with WinAVR 20080430 and my ATmega2560 code.
> In generated code comparisons of an ISR between 20071221 and 20080430, I
> noticed that r30 and r31 are not saved on the stack.  Normally, this
> wouldn't be a problem as the ISR itself does not use r30/r31.
> However, this ISR calls a function that does use r30/r31.  Again, it
> *should* be no problem, since the function has the responsibility to
> stor r30/r31 if it uses it.

It is the callers responsibility to save r30 and r31 registers if they are
needed across a function call.  At least that is my reading of the following


I admit I do not know what is supposed to happen if an ISR is using a
call-used register.


reply via email to

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