Extensions
Forms
4 (2 Legacy, 2 EVEX)
Data
Intel XED v2026.08.23

AADD adds a general-purpose register to a doubleword or quadword in memory atomically, as lock add does, but returns nothing and keeps much weaker ordering: it is one of RAO-INT’s remote atomic operations, which the processor may carry out far from the core, in a shared cache or at the memory controller. The destination must be memory, naturally aligned to its size and of the write-back type; a misaligned or non-WB destination raises #GP. A LOCK prefix raises #UD, and the flags are left alone. AAND, AOR and AXOR are the bitwise forms, on the same opcode, 0F38 FC, told apart by the prefix: none for AADD, then 66, F2 and F3.

Order and fences

Intel gives these operations the ordering of write-combining stores, like MOVNTI’s. One core’s accesses to the same location stay in program order, but an AADD may pass writes and other remote atomics to other addresses, so a set of them may reach memory in any order. Code that needs more uses SFENCE or MFENCE; an LFENCE after an AADD does not hold it back, as AADD loads nothing into the core. Inside a TSX transaction it aborts the transaction.

Where it pays

Intel’s example is a histogram shared by many cores: with XADD or lock add, a contended bin’s line moves from core to core for every update, while remote updates meet where the line already is. The same text warns that reading the location soon after, or mixing ordinary accesses with the updates, loses the benefit, and that an implementation may combine updates of one line only when they share the operation or the size, so mixed updates of a line are better kept apart in time.

In our builds and on Zen 5

GCC 14 and Clang 23 at -O2 with -mraoint compile _aadd_i32(&c, v) to aadd dword ptr [rip + c], edi (GCC’s spelling differs) and a histogram loop over _aadd_i32(&hist[p[i]], 1) to one AADD per byte. Neither picks it for a relaxed __atomic_fetch_add with the result unused, which stays lock add. Neither enables it for -march=sierraforest, grandridge or clearwaterforest, nor Clang 23 for diamondrapids. The Zen 5 behind this site’s recorded cases reports CPUID.(EAX=07H,ECX=1):EAX as 30h, without RAO-INT’s bit 3, and both cases, 32- and 64-bit, raised #UD.

Forms

Every encoding of AADD that Intel XED knows, one row per XED instruction form (iform). How to read the notation.
InstructionEncodingRequires
AADD m32, r32 AADD_MEM32_GPR32NP 0F 38 FC /rRAO_INT
AADD m64, r64 64-bit mode only AADD_MEM64_GPR64REX.W 0F 38 FC /rRAO_INT
AADD m32, r32 AADD_MEMi32_GPR32i32_APXEVEX.LLZ.NP.MAP4.W0 FC /rAPX_F + RAO_INT
AADD m64, r64 AADD_MEMi64_GPR64i64_APXEVEX.LLZ.NP.MAP4.W1 FC /rAPX_F + RAO_INT

Operation

What the forms do, in pseudocode that our tests run against results recorded on real processors. How to read.

if not cpuid_leaf(7, 1)[0] >> 3 & 1:
    fault(UD)                    # CPUID: no RAO-INT
dest.write(dest + src)           # one atomic read-modify-write, weakly
                                 # ordered, unlike LOCK ADD: #GP(0) unless
                                 # dest is aligned to its size and in
                                 # write-back memory; no flag changes

Run on AMD Zen 5 (EPYC 9645): 2 cases. Its cases ran where CPUID reported no RAO-INT, and every one raised an exception. The APX forms were not run: none of these processors has APX.

Operands

What each form reads and writes, as Intel XED records it: the operands of its syntax, in order, and the implicit ones that the syntax does not name. How to read.
OperandKindAction
AADD m32, r32 AADD m64, r64 64-bit mode only
m32/64explicitread, write
r32/64explicitread

Flags

None: XED records no flag that the forms test or change.

Exceptions

The exception class is XED's name for the set of exception conditions that a form follows. How to read.

Legacy forms
LEGACY-RAO-INT
EVEX forms
APX-EVEX-RAO-INT

Attributes

What else XED records about the forms. How to read.

All forms
always atomic; may abort a TSX transaction
AADD m32, r32
4-byte aligned memory operand
AADD m64, r64 64-bit mode only
8-byte aligned memory operand

Intrinsics

The C intrinsics of Clang 23.1.2 that compile to AADD, each with the form it compiles to and the Clang options it needs. The forms come from compiling every intrinsic and decoding the result with Intel XED; all intrinsics A–Z explains the method.

IntrinsicCompiles to
_aadd_i32 void _aadd_i32(int *__A, int __B)

AADD m32, r32 Legacy -mraoint

_aadd_i64 void _aadd_i64(long long *__A, long long __B)

AADD m64, r64 Legacy -mraoint

CPUID and processors

Each form belongs to an XED ISA set. A form can be used when the processor reports every CPUID bit of one of its ISA set's alternatives.

CPUID requirements and processors of the XED ISA sets above. Alternatives are separated by “or”; processors follow XED’s chip model, whose AMD processors end with Zen 2, and the CPU data of this site for Zen 3 to Zen 6.
ISA setCPUIDProcessors
RAO_INT

RAO_INT
CPUID.(EAX=07H,ECX=1):EAX[3] RAO_INT

None in XED’s chip model, which lists these instructions only under its placeholder for future processors.
APX_F_RAO_INT

APX_F + RAO_INT
CPUID.(EAX=07H,ECX=1):EDX[21] APX_F
CPUID.(EAX=07H,ECX=1):EAX[3] RAO_INT

None in XED’s chip model, which lists these instructions only under its placeholder for future processors.

More RAO-INT instructions

More APX instructions

All 88 APX instructions

Sources

  1. Intel XED v2026.08.23 (commit 0bcb6237345c): forms, encodings, operands, flags, exception classes, attributes, ISA sets, CPUID bits and chip model.
  2. Clang's x86 intrinsic headers, LLVM 23.1.2 (commit 85ac56026243): the intrinsics, their signatures and doc comments, and the Clang of that release, which compiled each of them.
  3. Intel Architecture Instruction Set Extensions and Future Features Programming Reference (319433-062, June 2026): page 2-2 (AADD)
  4. Intel Advanced Performance Extensions (Intel APX) Architecture Specification, revision 9.0 (355828-009, August 2026)

The tables are derived from Intel XED, Copyright Intel Corporation, licensed under the Apache License 2.0; x86-64.net converted and reformatted them. The intrinsics and their signatures come from Clang, part of the LLVM Project, licensed under the Apache License 2.0 with LLVM Exceptions. The text is our own.