RTEMS Logo

RTEMS 4.7.3 On-Line Library


PowerPC Specific Information Parameter Passing

PREV UP NEXT Bookshelf RTEMS CPU Architecture Supplement

5.2.5: Parameter Passing

RTEMS assumes that arguments are placed in the general purpose registers with the first argument in register 3 (r3), the second argument in general purpose register 4 (r4), and so forth until the seventh argument is in general purpose register 10 (r10). If there are more than seven arguments, then subsequent arguments are placed on the program stack. The following pseudo-code illustrates the typical sequence used to call a RTEMS directive with three (3) arguments:

load third argument into r5
load second argument into r4
load first argument into r3
invoke directive


PREV UP NEXT Bookshelf RTEMS CPU Architecture Supplement

Copyright © 1988-2004 OAR Corporation