XL Fortran for AIX 8.1

User's Guide


Prolog and Epilog

On entry to a procedure, you might have to do some or all of the following steps:

  1. Save the link register at offset 8 for 32-bit environments (or offset 16 for 64-bit environments) from the stack pointer if necessary.
  2. If you use any of the CR bits 8-23 (CR2, CR3, CR4, CR5), save the CR at displacement 4 for 32-bit environments (or displacement 8 for 64-bit environments) from the current stack pointer.
  3. Save any nonvolatile FPRs that are used by this procedure in the caller's FPR save area. You can use a set of routines: _savef14, _savef15, ... _savef31.
  4. Save all nonvolatile GPRs that are used by this procedure in the caller's GPR save area.
  5. Store back chain and decrement stack pointer by the size of the stack frame. Note that if a stack overflow occurs, it will be known immediately when the store of the back chain is done.

On exit from a procedure, you might have to perform some or all of the following steps:

  1. Restore all GPRs saved.
  2. Restore stack pointer to the value it had on entry.
  3. Restore link register if necessary.
  4. Restore bits 8-23 of the CR if necessary.
  5. If you saved any FPRs, restore them using _restfn, where n is the first FPR to be restored.
  6. Return to caller.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]