Quiz Entry - updated: 2026.07.14
How does the IA-32 (32-bit) calling convention differ from x86-64?
IA-32 passes all arguments on the stack rather than in registers — which is the main reason x86-64 calls are faster.
The two conventions differ most in where arguments live, and that difference drove a real performance gain when 64-bit arrived.
| Aspect | IA-32 | x86-64 |
|---|---|---|
| First 6 args | stack | registers |
| Args 7+ | stack | stack |
| Return value | %eax | %rax |
| Callee-saved | %ebx, %esi, %edi | %rbx, %rbp, %r12–%r15 |
| Caller-saved | %eax, %ecx, %edx | many |
| Frame pointer | usually %ebp | optional |
In IA-32 you constantly see arguments fetched relative to %ebp after the standard push %ebp; mov %esp,%ebp prologue:
movl 8(%ebp), %eax # 1st argument
movl 12(%ebp), %edx # 2nd argument
movl 16(%ebp), %ecx # 3rd argument
Why x86-64 is faster: memory is much slower than registers, so passing the first six arguments in registers — and having twice as many registers to work with — significantly speeds up function calls. (Recognizing stack-relative N(%ebp) argument access is also a quick way to tell you're looking at 32-bit code.)
Go deeper:
x86 calling conventions (Wikipedia) — contrasts stack-based IA-32 with register-based x86-64.