Introduction to OS X ABI Function Call Guide
This document describes the function-calling conventions used in the OS X ABI on the architectures on which OS X can run. Specifically, 32-bit PowerPC, 64-bit PowerPC, and IA-32.
The information in this document is based on 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 OS X ABI on each of the supported architectures. This information is especially useful to developers of development tools.
Organization of This Document
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 OS X.
PowerPC Numerics in Performance Documentation. Describes how floating-point operations are implemented in 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.sco.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 OS X x86-64 environment are based.
© 2010 Apple Inc. All Rights Reserved. (Last updated: 2010-11-17)