binutils Newspaper
NOVEMBER 30, 2026
x86 — Under Review — Sentiment 7 / 10

x86: Short circuit ACE outer product table pass

Optimizes x86 instruction decoding by introducing a new table for ACE outer product instructions.

This patch introduces a new table, USE_X86_64_EVEX_PFX_ACE_TABLE, to optimize the decoding of x86 ACE outer product instructions. These instructions share common attributes (64-bit, EVEX512, modrm.mod == 3, W0), allowing the disassembler to short-circuit the table lookup process for improved performance. The change removes redundant table entries and simplifies the decoding logic.

In the Thread 2 participants
  1. Haochen Jiang <haochen.jiang@intel.com> proposer

    Proposes to introduce a new table (`USE_X86_64_EVEX_PFX_ACE_TABLE`) to streamline the decoding of x86 ACE outer product instructions, noting that these instructions share common attributes.

    “All the ACE outer product instruction shares the same pattern (or you can say attributes): 64-bit, EVEX512, modrm.mod == 3 and W0. As Jan said, it gave us a chance to short circuit the table pass.”
  2. Jan Beulich <jbeulich@suse.com> reviewer

    Questions the inclusion of the 'W0' attribute for all ACE outer product instructions, suggesting it might not apply to all cases like TOP1PD.

    “The W0 part doesn't quite fit TOP1PD, so may want leaving out.”

Technical Tradeoffs

  • Introduces a new table, potentially increasing code size slightly, but offering performance gains during instruction decoding.

In Details

This patch introduces USE_X86_64_EVEX_PFX_ACE_TABLE into opcodes/i386-dis.c and related headers. It leverages the observation that ACE outer product instructions share common EVEX prefix attributes. By grouping these into a dedicated table, the disassembler can short-circuit the lookup process, avoiding redundant checks. This is an optimization for instruction decoding, specifically targeting the handling of these specialized x86 instructions.

For Context
ACE
Advanced Cryptography Extensions, a set of instructions for accelerating cryptographic operations.
EVEX
An instruction encoding scheme used in x86 processors (AVX-512 and later) that extends the existing VEX prefix, allowing for more advanced features and wider vector registers.
modrm.mod
A byte in x86 instruction encoding that specifies the addressing mode. 'mod' bits indicate whether the operand is a register or memory, and how the memory address is formed.
W0
A bit within the EVEX prefix that, in some contexts, indicates the operand size (e.g., 64-bit for registers).
TOP1PD
A specific x86 instruction (e.g., 'Multiply Packed Single-Precision Floating-Point Values').
Filed Under: x86disassembleroptimizationinstruction decoding