RTEMS Logo

RTEMS 4.6.1 On-Line Library


Calling Conventions Parameter Passing

PREV UP NEXT Bookshelf RTEMS PowerPC Applications Supplement

2.6: 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 PowerPC Applications Supplement

Copyright © 1988-2004 OAR Corporation