Per the abi <http://mspgcc.sourceforge.net/manual/c1225.html> (which I
haven't validated, but is probably still mostly right):
r12, r13, r14, and r15 - are call clobbered (in general) registers. If you
are interfacing C with assembler language, you do not have to save these
registers, except in interrupt service routines.
I don't know of a way to annotate a declaration so that the caller is aware
it does not need to save the registers you're not using. If you could write
the routine in C and allow it to be inlined, it's possible that
optimizations would eliminate the saves.
Peter
On Wed, Dec 29, 2010 at 2:06 PM, Rick Jenkins <[email protected]> wrote:
> In msp430-gcc-4.4.5, is there any way to override the default clobbered
> registers for a function? I have a small assembly routine which uses only
R15
> and R14, and I would like to be able to free up R12 and R13 for the
calling
> function to use.
> --
> Rick Jenkins <[email protected]>
> Hartman Technica http://www.hartmantech.com
> Phone +1 (403) 230-1987
> 221 35 Avenue. N.E., Calgary, Alberta, Canada T2E 2K5
>
>
------------------------------------------------------------------------------
> Learn how Oracle Real Application Clusters (RAC) One Node allows customers
> to consolidate database storage, standardize their database environment,
and,
> should the need arise, upgrade to a full multi-node Oracle RAC database
> without downtime or disruption
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> Mspgcc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users
>
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Mspgcc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users