Skip to content

CASD

32-bit Base **Group:** Atomic Operation  |  Ch 14   AMO — Atomic Memory Operations  |  **Length:** 32  |  **Decode:**

Assembly Syntax

  • casd<.{aq, rl, aqrl}> [SrcL], SrcR, SrcD, ->{t, u, Rd}

Encoding

CASD encoding
Bitfield encoding diagram. MSB is on the left, LSB on the right.

Description

Atomic memory read-modify-write operation.

Pseudocode (informative)

// Execute CASD as defined by the Atomic Operation semantics.

Encoding Notes

  • v0.58 32-bit compare-and-swap doubleword: old=[SrcL]; if old==SrcR then [SrcL]=SrcD; RegDst=old. Supports aq/rl ordering and has no far flag.

Full Catalog Forms

Assembly Length Decode
casd<.{aq, rl, aqrl}> [SrcL], SrcR, SrcD, ->{t, u, Rd} 32
← [Atomic Operation](../groups/atomic_operation.md)    [Index](../index.md)    [All instructions](index.md) →