Webcentive RISC-V Reference

Zabha instructions

Byte and Halfword Atomic Memory Operations

Adds byte and halfword atomic memory operations to the RISC-V Unprivileged ISA.

Extension description from riscv-unified-db, reformatted.

Specification chapter: The RISC-V Instruction Set Manual, src/unpriv/zabha.adoc.

Instructions (20)

MnemonicName (riscv-unified-db)XLEN
amoadd.bAtomic fetch-and-add byteRV32 and RV64
amoadd.hAtomic fetch-and-add halfwordRV32 and RV64
amoand.bAtomic fetch-and-and byteRV32 and RV64
amoand.hAtomic fetch-and-and halfwordRV32 and RV64
amocas.bAtomic compare-and-swap byteRV32 and RV64
amocas.hAtomic compare-and-swap halfwordRV32 and RV64
amomax.bAtomic MAX byteRV32 and RV64
amomax.hAtomic MAX halfwordRV32 and RV64
amomaxu.bAtomic MAX unsigned byteRV32 and RV64
amomaxu.hAtomic MAX unsigned halfwordRV32 and RV64
amomin.bAtomic MIN byteRV32 and RV64
amomin.hAtomic MIN halfwordRV32 and RV64
amominu.bAtomic MIN unsigned byteRV32 and RV64
amominu.hAtomic MIN unsigned halfwordRV32 and RV64
amoor.bAtomic fetch-and-or byteRV32 and RV64
amoor.hAtomic fetch-and-or halfwordRV32 and RV64
amoswap.bAtomic SWAP byteRV32 and RV64
amoswap.hAtomic SWAP halfwordRV32 and RV64
amoxor.bAtomic fetch-and-xor byteRV32 and RV64
amoxor.hAtomic fetch-and-xor halfwordRV32 and RV64