The only difference mentioned in the Intel instruction set reference is the usage of the overflow-flag instead of the carry-flag. When does one use ADOX instead of ADCX to perform an unsigned addition with a carry?
ADOX can be used when you don't want to overwrite the carry flag, like you've stored something like a rotation out.
However their main usage is to accelerate big-int arithmetics because now you can do two additions with carry in parallel in conjunction with mulx
From Intel's paper New Instructions Support Large Integer Arithmetic
ADCX/ADOX Instructions
The
adcxandadoxinstructions are extensions of theadcinstruction, designed to support two separate carry chains. They are defined as:adcx dest/src1, src2 adox dest/src1, src2Both instructions compute the sum of
src1andsrc2plus a carry-in and generate an output sum dest and a carry-out. The difference between these two instructions is thatadcxuses the CF flag for the carry in and carry out (leaving the OF flag unchanged), whereas theadoxinstruction uses the OF flag for the carry in and carry out (leaving the CF flag unchanged).
Related:
What is the difference between the ADC and ADCX instructions on ia32/ia64?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With