RTEMS Logo

RTEMS 4.9.5 On-Line Library


SPARC Specific Information Parameter Passing

PREV UP NEXT Bookshelf RTEMS CPU Architecture Supplement

9.2.6: 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 CPU Architecture Supplement

Copyright © 1988-2008 OAR Corporation