← Back to blog

Encoding Space: x86-64 vs AArch64

This is a personal study note — I write these to solidify my own understanding. If you spot anything wrong or have thoughts, feel free to reach out. Layout, formatting, and grammar assisted by Claude.


The two maps

Left: the 16 values of bits 28:25, the first bits an AArch64 decoder reads. Right: the 256 values an x86-64 instruction can start with. Hover for share and bit layout; click to zoom.

Colour by ·
AArch64 ·
x86-64 ·

The x86-64 maps in depth. Each escape byte opens a map below; each mandatory prefix (66, F3, F2) is a slab under its map. Drag to turn. Click a label to pull a slab out, click again to push it back.

· ·  ·  ·

Open questions

  • D6 (SALC): blank in Intel's one-byte map, invalid in 64-bit mode in AMD's. Counted as invalid here, so 19 dead cells; by Intel's table, 18.
  • 1011 › 011 and 111 (CFLT, TFLTZ, Armv9.8): taken from the Arm encoding index only. No shipping assembler encodes them yet.
  • 0F 38 FC (RAO-INT), 0F 38 8A/8B (MOVRS), 0F 38 F8 register forms (USER_MSR): in Intel's ISE document; check whether the SDM has absorbed them.
  • Cell word counts are upper bounds. SIMD structure loads need bits 21:16 = 0; the ADC/CCMP, 1- and 2-source and 3-source cells are a quarter or less allocated.
  • For 0F 00/01/09/AE/C7, the reg field of the ModRM byte picks the instruction too, as it does for FF and 80–83 in the first-byte map. A slab cell there stands for up to eight instructions.