Intel Posts GCC Compiler Patches For APX NDD

Written by Michael Larabel in Intel on 15 November 2023 at 08:56 AM EST. Add A Comment
INTEL
As part of their work on enabling Advanced Performance Extensions, Intel compiler engineers today posted a set of GNU Compiler Collection patches for enabling the 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.

Intel APX NDD GCC patches


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.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week