RISC-V ISA Explorer · Atomics (Za/Zic*)

Zabha: Byte/Halfword AMO

Ratified 2024-04 · version 1.0.0

Byte and halfword widths for the atomic memory operations, useful for subword locks, flags and counters.

Typical use: Subword AMO support

Specification

Open Zabha in the explorer

Dependencies

Requires

Instructions (18)

MnemonicNameEncodingMatchMask
AMOADD.BAtomic fetch-and-add byte00000------------000-----01011110x2f0xf800707f
AMOADD.HAtomic fetch-and-add halfword00000------------001-----01011110x102f0xf800707f
AMOAND.BAtomic fetch-and-and byte01100------------000-----01011110x6000002f0xf800707f
AMOAND.HAtomic fetch-and-and halfword01100------------001-----01011110x6000102f0xf800707f
AMOMAX.BAtomic MAX byte10100------------000-----01011110xa000002f0xf800707f
AMOMAX.HAtomic MAX halfword10100------------001-----01011110xa000102f0xf800707f
AMOMAXU.BAtomic MAX unsigned byte11100------------000-----01011110xe000002f0xf800707f
AMOMAXU.HAtomic MAX unsigned halfword11100------------001-----01011110xe000102f0xf800707f
AMOMIN.BAtomic MIN byte10000------------000-----01011110x8000002f0xf800707f
AMOMIN.HAtomic MIN halfword10000------------001-----01011110x8000102f0xf800707f
AMOMINU.BAtomic MIN unsigned byte11000------------000-----01011110xc000002f0xf800707f
AMOMINU.HAtomic MIN unsigned halfword11000------------001-----01011110xc000102f0xf800707f
AMOOR.BAtomic fetch-and-or byte01000------------000-----01011110x4000002f0xf800707f
AMOOR.HAtomic fetch-and-or halfword01000------------001-----01011110x4000102f0xf800707f
AMOSWAP.BAtomic SWAP byte00001------------000-----01011110x800002f0xf800707f
AMOSWAP.HAtomic SWAP halfword00001------------001-----01011110x800102f0xf800707f
AMOXOR.BAtomic fetch-and-xor byte00100------------000-----01011110x2000002f0xf800707f
AMOXOR.HAtomic fetch-and-xor halfword00100------------001-----01011110x2000102f0xf800707f