RISC-V ISA Explorer · Single-Letter Extensions

A: Atomics Bundle

Ratified 2019-12 · version 2.1.0

Atomic read-modify-write and load-reserved/store-conditional instructions for synchronizing harts sharing memory.

Typical use: LR/SC & AMO ops in hardware

Specification

Open A in the explorer

Dependencies

Requires

Instructions (22)

MnemonicNameEncodingMatchMask
AMOADD.DAtomic fetch-and-add doubleword00000------------011-----01011110x302f0xf800707f
AMOADD.WAtomic fetch-and-add word00000------------010-----01011110x202f0xf800707f
AMOAND.DAtomic fetch-and-and doubleword01100------------011-----01011110x6000302f0xf800707f
AMOAND.WAtomic fetch-and-and word01100------------010-----01011110x6000202f0xf800707f
AMOMAX.DAtomic MAX doubleword10100------------011-----01011110xa000302f0xf800707f
AMOMAX.WAtomic MAX word10100------------010-----01011110xa000202f0xf800707f
AMOMAXU.DAtomic MAX unsigned doubleword11100------------011-----01011110xe000302f0xf800707f
AMOMAXU.WAtomic MAX unsigned word11100------------010-----01011110xe000202f0xf800707f
AMOMIN.DAtomic MIN doubleword10000------------011-----01011110x8000302f0xf800707f
AMOMIN.WAtomic MIN word10000------------010-----01011110x8000202f0xf800707f
AMOMINU.DAtomic MIN unsigned doubleword11000------------011-----01011110xc000302f0xf800707f
AMOMINU.WAtomic MIN unsigned word11000------------010-----01011110xc000202f0xf800707f
AMOOR.DAtomic fetch-and-or doubleword01000------------011-----01011110x4000302f0xf800707f
AMOOR.WAtomic fetch-and-or word01000------------010-----01011110x4000202f0xf800707f
AMOSWAP.DAtomic SWAP doubleword00001------------011-----01011110x800302f0xf800707f
AMOSWAP.WAtomic SWAP word00001------------010-----01011110x800202f0xf800707f
AMOXOR.DAtomic fetch-and-xor doubleword00100------------011-----01011110x2000302f0xf800707f
AMOXOR.WAtomic fetch-and-xor word00100------------010-----01011110x2000202f0xf800707f
LR.DLoad Reserved Doubleword00010--00000-----011-----01011110x1000302f0xf9f0707f
LR.WLoad Reserved Word00010--00000-----010-----01011110x1000202f0xf9f0707f
SC.DStore conditional doubleword00011------------011-----01011110x1800302f0xf800707f
SC.WStore conditional word00011------------010-----01011110x1800202f0xf800707f