Table shows byte sizes of the corresponding bytes, with alignment in parentheses (if different).
Architecture | char | short | int | long | long long | pointer | bool | float | double | long double | |
---|---|---|---|---|---|---|---|---|---|---|---|
Darwin 32-bit Power PC | OS X | 1 | 2 | 4 | 4 | 8 | 4 | 1 | 4 | 8 | 16[2] |
Darwin 64-bit Power PC | OS X | 1 | 2 | 4 | 8 | 8 | 8 | 1 | 4 | 8 | 16 |
Darwin IA-32 | OS X | 1 | 2 | 4 | 4 | 8(4) | 4 | 1 | 4 | 8(4) | 16 |
System V i386 | Linux | 1 | 2 | 4 | 4 | n/a | 4 | n/a | 4 | 8(4) | 12(4) |
System V AMD64 | Linux x86-64 OS X x86_64 | 1 | 2 | 4 | 8 | 8 | 8 | 1 | 4 | 8 | 16 |
Windows x86 (32-bit) | 1 | 4 | 4 | 8 | 4 | ||||||
Windows x64 | 1 | 2 | 4 | 4 | 8 | 4 | 8 | n/a | |||
ARM 32-bit | 1 | 2 | 4 | 4 | 8 | 4 | 1 | 4 | 8 | 8 | |
ARM 64-bit | AArch64; LP64 | 1 | 2 | 4 | 8 | 8 | 8 | 1 | 4 | 8 | 16 |
MacOS 68k | 1 | 2 | 4(2) | 4(2) | 4(2) | 4 | 8/10/12[1](2) | 8 | |||
MacOS PowerPC | 1 | 4 | 4 | 8 |
[1]64-bit type is IEEE 754 binary64, 80-bit type is Apple SANE Extended, 96-bit type is Motorola 68881
[2]8 bytes prior to OS X v10.4
OS X ABI Function Call Guide
System V Application Binary Interface— Intel386 Architecture Processor Supplement
System V Application Binary Interface— AMD64 Architecture Processor Supplement
Procedure Call Standard for the ARM® Architecture
CodeWarrior® Targeting the MacOS
MacOS Runtime Architectures
architecture | scratch | preserved | parameters | return | frame | stack | globals |
---|---|---|---|---|---|---|---|
MacOS 68k | A0-A1,D0-D2,F0-F3 | A2-A4,D3-D7,F4-F7 | A6 | A7 | A5 | ||
MacOS PowerPC | GPR0 | ||||||
Win32 STDCALL | EAX, ECX, EDX | EBX, ESI, EDI, everything else | stack, right-to-left, callee deallocates | RAX | EBP | ESP | |
Microsoft x64 | RAX, RCX, RDX, R8-R11 | RBX, RBP, RDI, RSI, RSP, R12-R15 XMM6-XMM15 | RCX, RDX, R8-R9 XMM0-XMM3 stack, right-to-left, caller-saved | RAX; XMM0 | RBP | RSP | |
System V AMD64 | RDI, RSI, RDX, RCX, R8-R9 XMM0-XMM7 | RAX, RAX+RDX | RBP | RSP | R10 ('static chain') |
All pages under this domain © Copyright 1999-2018 by: Ben Hekster