RTEMS Hewlett Packard PA-RISC Applications Supplement
RTEMS assumes that the first four (4) arguments are placed in the appropriate registers (r26, r25, r24, and r23) and, if needed, additional are placed on the current stack before the directive is invoked via the bl or blr instruction. The first argument is placed in r26, the second is placed in r25, and so forth. The following pseudo-code illustrates the typical sequence used to call a RTEMS directive with three (3) arguments:
set r24 to the third argument set r25 to the second argument set r26 to the first argument invoke directive
The stack on the PA-RISC grows upward -- i.e. "pushing" onto the stack results in the address in the stack pointer becoming numerically larger. By convention, r27 is used as the stack pointer. The standard stack frame consists of a minimum of sixty-four (64) bytes and is the responsibility of the callee to maintain.
RTEMS Hewlett Packard PA-RISC Applications Supplement
Copyright © 1988-1998 OAR Corporation