Share via


SH-3 Return Values

The following list shows the standard registers that a called function uses to return values:

  • R0 for single-word integer and integer-equivalent values.
  • R0 for single-precision floating-point return values.
  • R4 for a pointer to the re-entrant memory allocated by a calling function for structure return values that are larger than four bytes. In this case, the called function copies the return value to the memory locations indicated by the value in R4 before returning, and passes a pointer to this copy in R0.
  • R0 for structures or unions that are not larger than four bytes.

Functions return all 64-bit integer and 64-bit floating-point values in the same way they return structures that are larger than four bytes.

See Also

SH-3 Calling Sequence Specification | SH-3 Registers | SH-3 Stack Frame Layout | SH-3 Parameter Passing | SH-3 Prolog and Epilog | SH-3 pdata Format | SH-3 Assembler Macros

 Last updated on Thursday, April 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.