Does AMOMINU.W place the new memory result in rd?
No. AMOMINU.W places the old memory word before the operation in rd; the result of unsigned min(oldWord, rs2LowWord) is written back to memory.
Atomic 32-bit word unsigned minimum: rd returns the old memory word, while memory receives the 32-bit result of unsigned min(oldWord, rs2LowWord)
The following semantics assume the target region supports this AMO width and operation and the access succeeds. AMOMINU.W performs an atomic read-modify-write on the 32-bit word addressed by rs1: it first reads the old memory word and sign-extends it into rd, then compares the old word and the low 32 bits of rs2 as unsigned 32-bit values and writes back the smaller word. The resulting 32-bit word is written back to the same address. aq/rl add ordering only in the accessed memory or I/O address domain and do not change the unsigned-minimum 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 word atomic field decode, aq/rl ordering bits, a memory read, and RMW state update.
A / Zaamo-extension word atomic instructions use a 32-bit encoding; the animation starts by splitting the fields.
AMOMINU.W selects the memory writeback word using an unsigned 32-bit comparison; this is not a per-bit logical operation.
Assumes the region supports this AMO and the access succeeds. Shows comparison, 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.
AMOMINU.W is used for atomic unsigned minimum updates. The value returned in rd on successful access with rd≠x0 is the old memory word; the new 32-bit word after the unsigned minimum operation is written only to memory.
Successful 32-bit access example: a2=0x1000, old memory=5, a1=3; amominu.w a0, a1, (a2) returns a0=5 and updates memory to 3. The address is naturally aligned and the region supports this AMO.
Successful 32-bit access example: a2=0x1000, old memory=5, a1=3; amominu.w a0, a1, (a2) returns a0=5 and updates memory to 3. The address is naturally aligned and the region supports this AMO.
No. AMOMINU.W places the old memory word before the operation in rd; the result of unsigned min(oldWord, rs2LowWord) is written back to memory.
No. aq/rl only affect memory-ordering constraints; they do not change this AMO.W instruction's 32-bit data result.