STTADD, STTADDL

Atomic add unprivileged, without return

This instruction atomically loads a 32-bit word or 64-bit doubleword from memory, adds the value held in a register to it, and stores the result back to memory.

  • STTADD does not have release semantics.
  • STTADDL stores to memory with release semantics, as described in Load-Acquire, Store-Release.
  • For information about addressing modes, see Load/Store addressing modes.

    Encoding: Integer

    Variants: FEAT_LSUI (ARMv9.6)

    313029282726252423222120191817161514131211109876543210
    00110010100000111111
    szARRso3opcRnRt

    32-bit no memory ordering (sz == 0 && R == 0)

    STTADD <Ws>, [<Xn|SP>]

    Equivalent to: LDTADD <Ws>, WZR, [<Xn|SP>]

    32-bit release (sz == 0 && R == 1)

    STTADDL <Ws>, [<Xn|SP>]

    Equivalent to: LDTADDL <Ws>, WZR, [<Xn|SP>]

    64-bit no memory ordering (sz == 1 && R == 0)

    STTADD <Xs>, [<Xn|SP>]

    Equivalent to: LDTADD <Xs>, XZR, [<Xn|SP>]

    64-bit release (sz == 1 && R == 1)

    STTADDL <Xs>, [<Xn|SP>]

    Equivalent to: LDTADDL <Xs>, XZR, [<Xn|SP>]

    Explanations

    <Ws>: Is the 32-bit name of the general-purpose register holding the data value to be operated on with the contents of the memory location, encoded in the "Rs" field.
    <Xn|SP>: Is the 64-bit name of the general-purpose base register or stack pointer, encoded in the "Rn" field.
    <Xs>: Is the 64-bit name of the general-purpose register holding the data value to be operated on with the contents of the memory location, encoded in the "Rs" field.

    Operational Notes

    If PSTATE.DIT is 1, the timing of this instruction is insensitive to the value of the data being loaded or stored.