Does AMOMINU.B return the post-operation value?
No. Like A-extension AMOs, rd receives the old value loaded from memory.
Atomic byte unsigned min: rd = *rs1 (zero-ext), *rs1 = umin(*rs1, rs2[7:0])
AMOMINU.B (Zabha extension) atomically loads a byte from the address in rs1 into rd (zero-extended), compares with the low byte of rs2, stores unsigned minimum back. Supports aq/rl bits.
AMOMINU.B is a Zabha 8-bit unsigned atomic minimum instruction. It atomically reads the old memory value, performs the read-modify-write at 8-bit width, and writes the sign-extended old value to rd.
Understand this scenario with real code like «amominu.b a0, a2, (a1)».
Understand this scenario with real code like «amominu.b a0, a2, (a1)».
No. Like A-extension AMOs, rd receives the old value loaded from memory.
Architecturally it modifies only the byte operand; Zabha provides native byte-granule atomic read-modify-write operations.