In order to reduce the number of register saves required for typical procedure
calls, the PA-RISC general and floating-point register files have been divided
into partitions designated as callee-saves and caller-saves. The names of these
partitions indicate which procedure takes responsibility for preserving the
contents of the register when a call is made.
If a procedure uses a register in the callee-saves partition, it must save the
contents of that register immediately after procedure entry and restore the
contents before the exit. Thus, the contents of all callee-saves registers are
guaranteed to be preserved across procedure calls.
A procedure is free to use the caller-saves registers without saving their
contents on entry. However, the contents of the caller-saves registers are not
guaranteed to be preserved across calls. If a procedure has placed a needed
value in a caller-saves register, it must be stored to memory or copied to a
callee-saves register before making a call.
These partitions and the other dedicated registers are shown in Figures 3-1
and 3-2.
Figure 3-1 Register PartitioningFigure 3-2 Floating-Point Registers