Does AMOOR.D place the new memory result in rd?
No. AMOOR.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 bitwise OR: rd returns the old memory value, while memory receives oldDoubleword | rs2Doubleword
The following semantics assume the target region supports this AMO width and operation and the access succeeds. AMOOR.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 bitwise OR 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 add ordering only in the accessed memory or I/O address domain and do not change the data result; ordering across both domains still needs FENCE. rs2 uses its pre-execution value; rd=x0 discards only the old-value register writeback, while the memory operation still occurs.
Shows A / Zaamo doubleword atomic field decode, aq/rl ordering bits, a memory read, and RMW state update.
A / Zaamo-extension doubleword atomic instructions use a 32-bit encoding; the animation starts by splitting the fields.
Assumes the region supports this AMO and the access succeeds. Shows the operation, old-value return, memory update and aq/rl ordering in the accessed domain. Steps are a teaching sequence; access faults, CPU cache coherence, pipelines and timing are not modeled.
AMOOR.D is an RV64 64-bit AMO.D read-modify-write instruction. On successful access with rd≠x0, rd 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.
Successful 64-bit access example: a2=0x1000, old memory=5, a1=3; amoor.d a0, a1, (a2) returns a0=5 and updates memory to 7. The address is naturally aligned and the region supports this AMO.
Successful 64-bit access example: a2=0x1000, old memory=5, a1=3; amoor.d a0, a1, (a2) returns a0=5 and updates memory to 7. The address is naturally aligned and the region supports this AMO.
Successful 64-bit access example: a2=0x1000, old memory=5, a1=3; amoor.d a0, a1, (a2) returns a0=5 and updates memory to 7. The address is naturally aligned and the region supports this AMO.
No. AMOOR.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.