x86/APX: more {nf} optimizations
A series of patches to optimize various x86 {nf} instruction forms for better code density.
This is a cover letter for a series of five patches aimed at optimizing various ‘nf’ (no-fused) instruction forms in the x86 architecture. The optimizations target XOR, IMUL, AND, and OR instructions with specific immediate values, seeking to replace them with more efficient or shorter equivalents like NOT or NEG, and improve code density.
In Details
This is the cover letter for a series of patches that enhance the x86 assembler's instruction selection heuristics. The focus is on 'nf' instruction forms, aiming to replace sequences that can be more compactly represented by single instructions (e.g., XOR with all-ones immediate becomes NOT, IMUL with all-ones immediate becomes NEG) or by narrower forms of the same instruction (e.g., 64-bit AND with small immediate becomes 8-bit AND).
- x86
- A family of instruction set architectures (ISAs) for CPUs, commonly used in personal computers and servers.
- APX
- Advanced Performance Extensions, a set of new instructions and features for x86 processors.
- {nf}
- Refers to instruction forms that do not utilize fused operations, often implying more explicit or less optimized instruction sequences.
- immediate value
- A constant value embedded directly within an instruction.
- assembly
- A low-level programming language that uses mnemonics to represent machine code instructions.