Home:Professional:Architectures

C Type Sizes

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 PCOS X 12448414816[2]
Darwin 64-bit Power PCOS X 12488814816
Darwin IA-32OS X 12448(4)4148(4)16
System V i386Linux 1244n/a4n/a48(4)12(4)
System V AMD64Linux x86-64
OS X x86_64
12488814816
Windows x86 (32-bit) 14484
Windows x64 1244848n/a
ARM 32-bit 1244841488
ARM 64-bitAArch64; LP64 12488814816
MacOS 68k 124(2)4(2)4(2)48/10/12[1](2)8
MacOS PowerPC 1448

Footnotes

[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

References

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

Registers

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