Intel ADX explained

Intel ADX (Multi-Precision Add-Carry Instruction Extensions) is Intel's arbitrary-precision arithmetic extension to the x86 instruction set architecture (ISA). Intel ADX was first supported in the Broadwell microarchitecture.[1] [2]

The instruction set extension contains just two new instructions, though MULX from BMI2 is also considered as a part of the large integer arithmetic support.[3]

Both instructions are more efficient variants of the existing ADC instruction, with the difference that each of the two new instructions affects only one flag, where ADC as a signed addition may set both overflow and carry flags, and as an old-style x86 instruction also reset the rest of the CPU flags. Having two versions affecting different flags means that two chains of additions with carry can be calculated in parallel.

AMD added support in their processors for these instructions starting with Ryzen.

InstructionDescription
ADCXAdds two unsigned integers plus carry, reading the carry from the carry flag and if necessary setting it there. Does not affect other flags than the carry.
ADOXAdds two unsigned integers plus carry, reading the carry from the overflow flag and if necessary setting it there. Does not affect other flags than the overflow.

External links

Notes and References

  1. Web site: Intel Software Development Emulator . software.intel.com . July 23, 2013 . October 16, 2013.
  2. https://software.intel.com/sites/default/files/319433-013b.pdf Intel Architecture Instruction Set Extensions Programming Reference
  3. Web site: New Instructions Supporting Large Integer Arithmetic on Intel Architecture Processors . . 2 January 2015.