Quiz Entry - updated: 2026.07.14
Which registers are used for each data size in x86-64?
Each general-purpose register has a name for every width: e.g. %rax (64), %eax (32), %ax (16), %al (8) — and the new registers use suffix letters: %r8, %r8d, %r8w, %r8b.
This is the naming system that lets one physical register be used at any of four widths. The original registers use distinct historical names, while the new R8–R15 registers use a regular suffix scheme that's much easier to remember.
| Size | Original-8 example | New-register form |
|---|---|---|
| 8-bit | %al, %bl, %sil, %dil | %r8b |
| 16-bit | %ax, %bx, %si, %di | %r8w |
| 32-bit | %eax, %ebx, %esi, %edi | %r8d |
| 64-bit | %rax, %rbx, %rsi, %rdi | %r8 |
movb %al, (%rdi) # store 1 byte
movl %eax, (%rdi) # store 4 bytes
movq %rax, (%rdi) # store 8 bytes
Important reminder: writing the 32-bit form (%eax, %r8d) automatically zeros the upper 32 bits of the full register, while the 8- and 16-bit forms do not. This asymmetry is the single most common cause of "where did my upper bits go?" confusion.
Go deeper:
x86 (Wikipedia) — the per-width register naming, including the r8d/r8w/r8b scheme.