Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

load effective address

x86-64's lea instruction, which works out an address with the memory-operand rules and puts the number in a register without touching memory.

lea dest, [address expression] writes the effective address to dest and performs no memory access and changes no other state, which compilers also exploit for adds and small multiplies.

Examples

  • lea rax, [rdi + rdi*2] computes rdi × 3 without reading memory.

Read the full section →