Does AMOADD.B return the post-operation value?
No. Like A-extension AMOs, rd receives the old value loaded from memory.
Atomic byte add: rd = *rs1 (sign-ext), *rs1 += rs2[7:0]
AMOADD.B (Zabha extension) atomically loads a byte from the address in rs1 into rd (sign-extended), adds the low byte of rs2 (overflow wraps), and stores the result back. Supports aq/rl bits.
Shows Zabha byte atomic field decode, aq/rl ordering bits, memory read, and RMW state update.
Zabha-extension byte atomic instructions use a 32-bit encoding; the animation starts by splitting the fields.
AMOADD.B uses full 8-bit byte addition and writes the low 8-bit result to memory; this view avoids per-bit equations that would hide the carry chain.
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.
AMOADD.B is a Zabha 8-bit atomic add 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 «amoadd.b a0, a2, (a1)».
Understand this scenario with real code like «amoadd.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.