General-Purpose x86-64 Instruction Encoding
A form-by-form catalog for integer data movement, arithmetic, logic, control flow, stack, string, atomic, and core system instructions - designed for implementers of assemblers, disassemblers, JIT compilers, and binary tools.
About this book
General-Purpose x86-64 Instruction Encoding — Volume 2 is an implementation-oriented technical reference dedicated to the encoding of the core instructions that form the everyday foundation of x86-64 machine code. Building on the encoding structures introduced in Volume 1, this volume moves from fundamental encoding mechanics to a practical, form-by-form study of general-purpose instructions.
The book covers the major instruction families used by assemblers, compilers, operating systems, runtimes, debuggers, and binary tools. These include integer data movement, arithmetic, logical and bit operations, comparisons, shifts and rotations, stack operations, branches, calls and returns, conditional execution, string instructions, atomic operations, synchronization primitives, and selected core system instructions.
Rather than treating an instruction mnemonic as a single encoding, the book emphasizes an essential property of the x86-64 architecture: one mnemonic may represent several distinct instruction forms. Operand types, register widths, immediate sizes, addressing modes, opcode variants, ModR/M fields, REX prefixes, and architectural restrictions can all affect the final byte sequence.
For this reason, the material is organized around a practical implementation workflow:
identify the instruction → select the legal form → resolve operands and encoding fields → emit the bytes → verify the result.
This form-oriented approach is particularly valuable for developers implementing assemblers, disassemblers, JIT compilers, binary translators, debuggers, virtual machines, executable-analysis tools, and other low-level software.
The volume also connects instruction semantics with their binary representation. Readers can see not only what an instruction does, but how its operands are represented inside the machine-code stream and how an encoder can systematically select the appropriate binary form.
Special attention is given to areas where x86-64's historical evolution creates implementation challenges: implicit operands, accumulator-specific encodings, sign-extended immediates, alternative opcode forms, register restrictions, memory addressing, relative control transfers, stack semantics, LOCK and atomic operations, and instructions whose availability depends on operating mode or processor capabilities.
The objective is not to replace the official Intel or AMD architecture manuals. Those remain authoritative for exact architectural behavior, exceptions, feature detection, and encoding restrictions. Instead, this volume acts as an implementation-focused bridge between architectural documentation and actual encoder design, organizing the information around the decisions that an assembler or binary-tool developer must make.
Together with Volume 1: Foundations of x86-64 Instruction Encoding, this book establishes the practical core required to build a reliable general-purpose x86-64 encoder and provides the foundation for later volumes covering increasingly advanced instruction families and modern vector encoding systems.
The PDF is not exposed as a public static URL. The download endpoint validates the catalog record, updates statistics, then streams the file.


