This document describes the function-calling conventions used in the Mac OS X ABI on the architectures on which Mac OS X can run. Specifically, 32-bit PowerPC, 64-bit PowerPC, and IA-32.
Organization of This Document
See Also
The information in this document is based on Mac OS X v10.4 and later, and Xcode Tools 2.2 and later.
This document is intended for developers interested in the calling conventions used in the Mac OS X ABI on each of the supported architectures. This information is especially useful to developers of development tools.
This document contains the following articles:
Each of these articles describes the data types that can be used to manipulate the arguments and results of function calls, how routines pass arguments to the functions they call, and how functions pass results to their callers. They also list the registers available in each architecture and whether their value is preserved after a function call.
The following documents contain information related to function calls in Mac OS X.
PowerPC Numerics in Performance Documentation. Describes how floating-point operations are implemented in Mac OS X.
System V Application Binary Interface: Intel386 Architecture Processor Supplement. Describes the data representation, register usage, stack management, and function-calling sequence the System V ABI uses in the IA-32 architecture. This document is located at http://www.caldera.com/developers/devspecs/abi386-4.pdf.
System V Application Binary Interface AMD64 Architecture Processor Supplement, found at http://www.x86-64.org/documentation. Describes the System V x86-64 ABI, on which the function calling conventions used in the Mac OS X x86-64 environment are based.
© 2009 Apple Inc. All Rights Reserved. (Last updated: 2009-02-04)