The Address Generation Unit (AGU): How CPUs Compute Memory Addresses While Everything Else Runs

2026-06-29

Every load and store needs an address before it can hit the cache. That address is rarely a constant — it's something like [rbp + rcx*8 + 0x40]. Computing it is a real arithmetic operation, and modern CPUs dedicate specialized hardware to it: the Address Generation Unit (AGU). Putting address math on the regular ALUs would block actual computation behind every memory access.

An AGU computes the canonical x86-style addressing mode in one cycle:

effective_address = base + index * scale + displacement

The scale is a fixed shift (1, 2, 4, or 8), not a real multiply — it's just wiring. The displacement is an immediate baked into the instruction. So an AGU is essentially a 3-input adder with a barrel-shifter on one leg. Cheap, fast, and replicated.

Why multiple AGUs matter: A modern Intel Golden Cove core has three AGUs — two for loads, one for store-address generation, plus a dedicated store-data port. Zen 4 is similar. That's why a core can sustain two loads + one store per cycle: the AGUs are the bottleneck, not the cache itself.

Real example — pointer chasing vs. array walking:

The complex-addressing-mode penalty: On some microarchitectures, addressing modes with both an index and a non-zero displacement ([rax + rcx*8 + 16]) take an extra cycle of load latency vs. simple [rax]. Intel calls this the "complex AGU" path. Rule of thumb: simple [reg] or [reg+disp] loads are 4 cycles to L1; [reg+reg*scale+disp] can be 5. Tight loops with load-use chains feel this.

Why this design wins: Address math is independent of data math. By giving it its own ports and its own simple adders, the CPU can sustain memory bandwidth while the main ALUs grind on whatever the loaded data feeds. Take the AGUs away and even a 10-wide core would starve.

Key Takeaway: AGUs are dedicated 3-input adders that compute memory addresses in parallel with arithmetic, and their count — not the cache — sets the ceiling on how many loads and stores a core can issue per cycle.

All newsletters