Jump to content

Intel ADX: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Line 14: Line 14:
|-
|-
| <code>ADOX</code>
| <code>ADOX</code>
| Adds two unsigned integers plus carry, with the carry read from there overflow flag and if necessary set ithere. Does not affect other flags than overflow.
| Adds two unsigned integers plus carry, with the carry read from there overflow flag and if necessary set there. Does not affect other flags than overflow.
|}
|}



Revision as of 04:42, 28 February 2015

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

New instructions

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

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

Instruction Description
ADCX Adds two unsigned integers plus carry, with the carry read from the carry flag and if necessary set there. Does not affect other flags than carry.
ADOX Adds two unsigned integers plus carry, with the carry read from there overflow flag and if necessary set there. Does not affect other flags than overflow.

References

  1. ^ "Intel Software Development Emulator". software.intel.com. July 23, 2013. Retrieved October 16, 2013.
  2. ^ Intel Architecture Instruction Set Extensions Programming Reference (Document number 319433-013B) // Intel, July 2012, Chapter 9: Additional new instructions
  3. ^ a b "New Instructions Supporting Large Integer Arithmetic on Intel®Architecture Processors" (PDF). Intel. Retrieved 2 January 2015.