Procedure Return Model

   
  1. Extract the return pointer from the stack frame. Before returning to the calling procedure, the called procedure first retrieves the return pointer from the stack and places it in r2.

  2. Restore any callee save registers. Any of the callee save registers that have been modified are restored.

  3. Deallocate the stack frame. The stack space that has been allocated for this procedure must be deallocated by decrementing the stack pointer.

  4. Branch to the return pointer. A BV instruction to GR2 is used to branch back to the calling procedure.

  5. Restore the caller save registers. Any of the caller save registers that were saved before the procedure call are restored by the calling procedure.



HP-UX 11i Internals
HP-UX 11i Internals
ISBN: 0130328618
EAN: 2147483647
Year: 2006
Pages: 167

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net