Share via


MIPS Functions with Variable Argument Lists

When functions declare variable argument lists, they do not pass arguments in floating-point argument registers. Instead, they use existing MIPS Calling Sequence Specifications. This means that functions pass the first four words of the argument block in the general argument registers a0 through a3. They pass all succeeding words in the argument block on the stack, in argument order.

The Windows CE MIPS calling sequence provides a varargs implementation that supports typical uses of the ANSI C varargs specification. The following list shows varargs implementations.

  • va_list can be implemented as a C pointer.
  • va_arg can be implemented as properly casting and dereferencing the va_list, then incrementing the va_list by the size of the given type.
  • va_start can be implemented as returning the address of the item immediately following the one given to it.
  • va_end can be implemented as a nop.

See Also

MIPS Parameter Passing

 Last updated on Thursday, April 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.