binutils Newspaper
NOVEMBER 30, 2026
x86 — Proposed

x86: introduce <hl> template

Introduces a new <hl> template in binutils' i386-opc.tbl to simplify the definition of instruction pairs involving high/low byte operations.

This patch introduces a new template <hl:mov:fp:int:mul:shuf:rep:opsz, h:4:1:8:e5:f3:f2:, l:0:0:0:d5:f2:f3:66> into the binutils opcodes table for x86. The goal is to reduce redundancy in defining instruction pairs that share similar patterns, particularly those involving high and low byte operations. This template aims to cover various instructions like MOV, FP, INT, MUL, SHUF, REP, and OPSZ, streamlining the opcode table maintenance.

In the Thread 1 participant
  1. Jan Beulich <jbeulich@suse.com> proposer

    Proposes adding a new <hl> template to the i386-opc.tbl to abstract common instruction patterns, aiming to reduce code duplication.

    “<hl:mov:fp:int:mul:shuf:rep:opsz, h:4:1:8:e5:f3:f2:, l:0:0:0:d5:f2:f3:66>”

In Details

This patch modifies binutils' opcode table (i386-opc.tbl) for x86 architecture. It introduces a new template <hl> to abstract common prefixes and opcodes for instruction pairs, such as PMULHW and PMULLW, which have related high/low byte variations. This aims to reduce the boilerplate in defining similar instructions, especially with the addition of new instruction extensions.

For Context
opcodes
The part of a machine language instruction that specifies the operation to be performed.
i386-opc.tbl
A table file used by binutils to define the opcodes and instruction formats for the Intel 386 and compatible architectures.
template
In this context, a macro-like construct within the opcode table definition that allows for reusable definitions of instruction patterns.
x86
A family of instruction set architectures (ISAs) developed by Intel, commonly used in personal computers and servers.
Filed Under: binutilsx86assemblyopcode