Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Mac OS Runtime Architectures /
Chapter 5 - CFM-68K Runtime Conventions / Routine Calling Conventions


Register Preservation

Table 5-2 lists registers used in the CFM-68K runtime environment and their volatility in function calls. Registers that retain their value after a routine call are called nonvolatile. All registers are 4 bytes long.
Table 5-2 Volatile and nonvolatile registers
TypeRegister Preserved by
a routiine call?
Notes
Data registerD0 through D2No 
 D3 through D7Yes 
Address registerA0No 
 A1NoUsed to pass transition vector addresses (+4) when making indirect or cross-fragment calls.
 A2 through A4Yes 
 
Address register A5See next columnUsed to access global data objects and the jump table. A5 is preserved by direct (in-fragment) calls, but not by cross-fragment or indirect calls.
 A6YesUsed as the back link and frame pointer when making cross-fragment calls.
 A7See next columnA7 is the stack pointer used to push and pop parameters and other temporary data items
Floating- point registerF0 through F3NoWhen present.
 F4 through F7YesWhen present.
Condition RegisterCRNoBits are set by compare instructions and used for conditional branching.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 MARCH 1997