Intel Posts GCC Compiler Patches For APX NDD
The APX documentation has described the NDD feature as the "New Data Destination" as a register for many integer instructions for use with new three-operand instruction formats. The APX documentation doesn't go into much detail on the New Data Destination but today's GCC patch cover letter does describe it a bit better:
"NDD means New data destination. In such forms, NDD is the new destination register receiving the result of the computation and all other operands (including the original destination operand) become read-only source operands. This feature, i.e.
Existing form | Existing semantics | NDD extension | NDD semantics
INC r/m | r/m := r/m + 1 | INC ndd, r/m | ndd := r/m + 1
SUB r/m, imm | r/m := r/m - imm | SUB ndd, r/m, imm | ndd(v) := r/m - imm
SUB r/m, reg | r/m := r/m - reg | SUB ndd, r/m, reg | ndd(v) := r/m - reg
SUB reg, r/m | reg := reg - r/m | SUB ndd, reg, r/m | ndd(v) := reg - r/m
Theoratically, it will provide more flexibility in compiler optimization.
In this series of patch, we will suport below instructions as basic NDD support:
INC, DEC, NOT, NEG, ADD, SUB, ADC, SBB, AND, OR, XOR, SAL, SAR, SHL, SHR, RCL, RCR, ROL, ROR, SHLD, SHRD, CMOVcc"
These 16 patches lay out the initial support for Intel APX NDD.
With feature work on GCC 14 set to end in a few days as they embark on their next stage of development, it's looking like Intel APX enablement in full won't be wrapped up for this next annual GCC compiler release due out in early 2024... Unless the GCC developers decide to accept new APX code late in the cycle. So as such it might not be until GCC 15 in early 2025 when the Intel APX support is wrapped up. Presumably it's not going to be until 2025~2026 anyhow until finding Intel processors shipping with Advanced Performance Extensions support.