x86/APX: Optimize AND with small immediates
GAS optimizes AND instructions with small immediate values on x86/APX architecture.
The GNU Assembler (GAS) now optimizes certain forms of the AND instruction on the x86/APX architecture when a small immediate value is used. This change allows instructions like AND $imm8 to be encoded more compactly using byte operations, leveraging EVEX.ND encodings. The optimization is applied to preserve code size and efficiency.
In Details
This change in GAS for x86/APX targets specific patterns of AND operations with small immediate operands. It leverages EVEX.ND encodings to allow byte-sized immediate operations where previously only word or larger sizes were implied. This optimization is primarily focused on code density by using more compact encodings when possible, particularly for the AND instruction with immediate values.
- x86/APX
- An extension to the x86 instruction set architecture, likely referring to Advanced Performance Extensions, which introduces new instructions and encodings for improved performance.
- GAS
- GNU Assembler, the assembler used by the GNU toolchain. It translates assembly language into machine code.
- EVEX.ND encoding
- A specific encoding scheme within the EVEX (Enhanced Vector Extension) instruction set architecture, used for advanced SIMD and floating-point operations. The '.ND' likely refers to features related to non-destructive operations or specific operand handling.
- immediate value
- A constant value directly embedded within an instruction, rather than being stored in a register or memory location.