RTEMS Logo

RTEMS 4.6.99.3 On-Line Library


Calling Conventions Parameter Passing

PREV UP NEXT Bookshelf RTEMS SPARC Applications Supplement

2.7: Parameter Passing

RTEMS assumes that arguments are placed in the caller's output registers with the first argument in output register 0 (o0), the second argument in output register 1 (o1), and so forth. Until the callee executes a save instruction, the parameters are still visible in the output registers. After the callee executes a save instruction, the parameters are visible in the corresponding input registers. The following pseudo-code illustrates the typical sequence used to call a RTEMS directive with three (3) arguments:

load third argument into o2
load second argument into o1
load first argument into o0
invoke directive


PREV UP NEXT Bookshelf RTEMS SPARC Applications Supplement

Copyright © 1988-2004 OAR Corporation