ISARef Multi-ISA & Silicon Reference
45,419 ISA items · 105,907 timings · 1,823 microarchs · 16,083 chips · 105 sources
Arch:
Tier:

amoadd.h.rl

T1 riscv atomic insn
Atomic fetch-and-add halfword (release)
SourceRISC-V Official Unified Database (riscv-unified-db) (riscv_unified_db)
Reliability TierT1 — Official Specification
ISA / Silicon ScopeRV32/RV64 Zabha
RV32 / RV64 (Ratified & Standard Extensions)
License & VersionApache-2.0 / CC-BY-4.0
main
Upstreamhttps://github.com/riscv/riscv-unified-db
Privilegeuser
ExtensionsZabha

Summary

Atomically with release ordering:

Syntax / Encoding

amoadd.h.rl xd, xs2, (xs1) | 0000001xxxxxxxxxx001xxxxx0101111 (mask=0xfe00707f match=0x0200102f)

Binary Encodings (1)

WidthFormatBit PatternMask / Match
32RV0000001xxxxxxxxxx001xxxxx01011110xfe00707f / 0x0200102f

Operands

NameDescription
xs2bits [24:20]
xs1bits [19:15]
xdbits [11:7]

Reference Notes

Atomically with release ordering:

  * Load the halfword at address _xs1_
  * Write the sign-extended value into _xd_
  * Add the least-significant halfword of register _xs2_ to the loaded value
  * Write the result to the address in _xs1_