Does AMOXOR.D place the new memory result in rd?
No. AMOXOR.D places the old 64-bit memory value before the operation in rd; the result of oldDoubleword ^ rs2Doubleword is written back to memory.
RV64 atomic 64-bit doubleword XOR: rd returns the old memory value, while memory receives oldDoubleword ^ rs2Doubleword
AMOXOR.D performs an atomic read-modify-write on the 64-bit doubleword addressed by rs1: it first reads the old memory doubleword into rd, then computes oldDoubleword ^ rs2Doubleword using XOR semantics and writes the 64-bit result back to the same address. The operation uses matching bit positions from the old doubleword and the rs2 doubleword. aq/rl bits affect memory ordering only; they do not change the data result.
Shows A-extension doubleword atomic field decode, aq/rl ordering bits, memory read, and RMW state update.
A-extension doubleword atomic instructions use a 32-bit encoding; the animation starts by splitting the fields.
This animation shows ISA-visible atomic read-modify-write, compare-and-swap, LR/SC reservation state, and ordering bits, not any specific CPU cache-coherence implementation, pipeline, or timing.
AMOXOR.D is an RV64 64-bit AMO.D read-modify-write instruction. rd always returns the old doubleword before the operation; only the result of oldDoubleword ^ rs2Doubleword is written back to memory, so keep old-value return separate from memory update.
Understand this scenario with real code like «amoxor.d a0, a1, (a2) # a0 = *a2; *a2 ^= a1 (64-bit)».
Understand this scenario with real code like «amoxor.d a0, a1, (a2) # a0 = *a2; *a2 ^= a1 (64-bit)».
Understand this scenario with real code like «amoxor.d a0, a1, (a2) # a0 = *a2; *a2 ^= a1 (64-bit)».
No. AMOXOR.D places the old 64-bit memory value before the operation in rd; the result of oldDoubleword ^ rs2Doubleword is written back to memory.
No. aq/rl only affect memory-ordering constraints; they do not change this AMO.D instruction's 64-bit data result.