<i>the calculation of addresses for the XOR swap</i><p>I&#x27;d be interested to know more about the internal implementation, but I don&#x27;t think that address calculation uses any additional registers (physical or logical).   There are multiple execution ports dedicated to address generation, and I think they are self-contained.<p><i>multiple CPU registers to do the abs()</i><p>Likely yes for any library implementation, although this made me wonder if it&#x27;s possible to do it in-place with constants.   Turns out it is, Hacker&#x27;s Delight to the rescue:<p><pre><code>  abs(x) == ((x &gt;&gt;&gt; 30) | 1) * x
</code></pre>
<a href="http:&#x2F;&#x2F;hackersdelight.org&#x2F;basics2.pdf" rel="nofollow">http:&#x2F;&#x2F;hackersdelight.org&#x2F;basics2.pdf</a>