"Doug McFadyen" <[EMAIL PROTECTED]> wrote in message news:68401@palm-dev-forum... > > > Hi Ben, > > This is the kind of information I was looking for, but I've never found a > definitive source. > > I have a very very tight inner loop asm function. Speed is everything for > this asm function. My asm function uses d0 to d7, and a0 to a5. My asm > function does NOT call anything else, so even though I saved A4 and A5, I'm > not worried using them because I'm not calling anyone else or referencing > global variables. > > On entry to my asm function, I save registers like this: > movem.l d3-d7/a2-a5, -(sp) > > So, is my assumption that I don't need to save away d0 to d2 and a0 to a1 > correct? Note I am not changing a6 and a7 (and sp is really a7).
To quote the "Register Allocation" section of the "Targetting Palm OS" manual included with CW Palm 8: The compiler uses these registers for local variables: - A2 through A4 for pointers (only A2 and A3 in expanded mode) - A6 for pointers (if you disable A6 stack frames) - D3 through D7 for integers and pointers so, your save instruction looks good. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
