XADD exchanges the values in its two operands, and then adds
them together and writes the result into the destination (first)
operand. This instruction can be used with a LOCK prefix for
multi-processor synchronisation purposes.
xadd
486 and laterExchange and Add
xadd r/m8, reg8 | xadd r/m16, reg16 | xadd r/m32, reg32 | xadd r/m64, reg64Loading...
Forms
Every form of xadd the assembler accepts, from NASM's own instruction table.
The second column is the processor that introduced the form; a badge marks a form that needs
an extension, that is lockable, or that long mode dropped.
| Form | Since | Notes |
|---|---|---|
| xadd r/m8, reg8 | 486 | lock |
| xadd r/m16, reg16 | 486 | lock |
| xadd r/m32, reg32 | 486 | lock |
| xadd r/m64, reg64 | x86-64 | locklong |