Thank you for the clarification. I am writing the task switching code for
an RTOS and need to save the entire contents of the task. In this case I
think that I need to save all registers (r4-r15), regardless of whether
they are used is the particular function interrupted or not.

In this case, is there an option to either have the compiler save all
registers? Or non of them and I can save them explicitly. Perhaps I should
write this code in assemblyto give me full control.

Thanks for your input,
        Tom.

On Mon, 10 Feb 2003, Chris Liechti wrote:

> Am 10.02.2003 23:01:47, schrieb "Thomas W. Carley" <[email protected]>:
> >  Hello ? I am new to msp430 gcc port. I would like to know what registers 
> > are
> >  pushed onto the stack on interrupt when the ?interrupt? keyword is used.
> >  Obviously the SP and SR are pushed, but are R4-R15 also?
>
> that (and the reti) is the whole point of it.
> the registers are saved only if required (not all by default)
>
> >I could not find
> >  enough information in the documentation.
>
> maybe not obvious to find, but its there:
> "Every function call starts from function prologue. In the prologue passes
> call used registers (r4-r11 and r4-r15 for interrupt functions) on stack.
> Then stack pointer being adjusted by subtracting frame size from r1. Naked
> functions does not issue prologue. 'interrupt' attribute forces to save all
> function used registers."
>
> line 1075 and below: "A.3 Calls definitions". in msp430-libc/doc/doc.txt
>
> chris
>
>
>
>
> -------------------------------------------------------
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld http://www.vasoftware.com
> _______________________________________________
> Mspgcc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users
>


Reply via email to