Does AMOMAXU.B return the post-operation value?
No. Like A-extension AMOs, rd receives the old value loaded from memory.
Atomic byte unsigned max: rd = *rs1 (sign-ext), *rs1 = umax(*rs1, rs2[7:0])
Syntax is rd, rs2, (rs1). The three fields select x0–x31 or ABI names, with no offset immediate or rs3.
funct5=11100, funct3=000, opcode=0101111; aq at bit26 and rl at bit25 are independent ordering bits.
RV32/RV64 Zabha (requires Zaamo): rd receives the sign-extended old 8-bit memory value; only the low 8 rs2 bits compute new memory.
The region must support this AMO width and operation. Every byte address is naturally aligned.
Sources use pre-execution values; rd=x0 discards register writeback while memory read-modify-write still occurs. aq/rl orders only the accessed memory/I/O domain.
AMOMAXU.B is a Zabha instruction, for which Zabha depends on Zaamo. It atomically loads a byte from the address in rs1 into rd (sign-extended), compares it as an unsigned byte with the low byte of rs2, stores the selected unsigned max value back, and supports aq/rl bits.
Shows Zabha (requires Zaamo) byte atomic field decode, aq/rl ordering bits, a memory read, and RMW state update.
Zabha depends on Zaamo; Zabha-extension byte atomic instructions use a 32-bit encoding; the animation starts by splitting the fields.
Assumes Zabha and Zaamo at the selected XLEN, successful fetch, a region supporting this width and operation, and a successful access. A misaligned halfword requires the stated PMA condition. Sources use pre-execution values; aq/rl orders only the accessed domain. Steps are a teaching sequence.
AMOMAXU.B is a Zabha 8-bit unsigned max instruction. It atomically reads the old memory value, selects the memory writeback with an unsigned 8-bit comparison, and writes the sign-extended old value to rd.
RV32/RV64 Zabha+Zaamo, a1=0x1000, old 8-bit memory=0x80 and a2=1; assume a supporting region and normal completion: amomaxu.b a0, a2, (a1) returns a0=0xFFFFFF80 (RV32) or 0xFFFFFFFFFFFFFF80 (RV64) and writes 0x80 to memory. Comparison uses unsigned 8-bit values.
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.