Register Usage

Recall from our discussion of the PA-RISC architecture in Chapter 1 that only four registers have specific meaning: GR0, GR1, GR2, and GR31. The runtime architecture specifies guidelines for many of the remaining registers.

Registers 3 through 18 are designated as callee save registers. This means that if these registers are going to be overwritten, it is the responsibility of the callee or the called function to save their contents. These registers are commonly used for storage of local variables in a function and are stored to the stack before being used. They then must be restored to their original values before returning to the calling program.

Registers 19 through 26 are caller save registers. If the calling function wants ...

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.