casp

Compare and Swap Pair

CASP <Ws>, <W(s+1)>, <Wt>, <W(t+1)>, [<Xn|SP>]

Atomic CAS of a pair of registers (128-bit or 64-bit pair).

Details

The Compare and Swap Pair instruction atomic CAS of a pair of registers (128-bit or 64-bit pair).

Pseudocode Operation

// Atomic CAS of a pair of registers (128-bit or 64-bit pair)

Example

CASP w6, W(s+1), w3, W(t+1), [x1]

Encoding

Binary Layout
00001000
1
0
1
00010
11111
Rn
Rt
 
Format Atomic
Opcode 0x48207C00
Extension LSE (Atomics)

Operands

  • Ws
    Cmp 1
  • Wt
    Swap 1
  • Xn
    First source / base 64-bit integer register