Procedure Call Model

When a procedure call is made, the following steps must take place.

1.
Save all caller save registers (registers 19 through 26). This means if the information in these registers is to be saved, the calling procedure is responsible for saving it on the stack.
2.
Store arguments to be passed. The arguments that are passed to the called procedure are placed into registers and/or on the stack. The first four arguments, arg0 through arg3, are placed in registers r26 through r23. If the procedure call requires more than four arguments, the remaining arguments are placed on the stack.
3.
Branch to the called procedure. A branch is taken to the called procedure using a B,L or BE,L instruction. The return pointer is placed into GR2 ...

Get HP-UX 11i Internals now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.