stwat

Store Word Atomic

stwat RS,RA,FC

Stores a word atomically to memory.

Details

Stores a 32-bit word from GPR RS to memory at an address in RA with atomic semantics specified by function code FC. The store is performed atomically with fence behavior determined by FC. Alignment requirements and potential privilege restrictions apply.

Pseudocode Operation

EA ← RA
[EA] ← RS
# Atomic store with fence behavior determined by FC

Programming Note

The stwat instruction atomically updates a word in memory at the address specified by register RA. Ensure that RA is properly aligned to avoid exceptions. The function code FC determines the specific update operation; consult the ISA documentation for valid operations. This instruction operates at user privilege level and does not generate any exceptions under normal conditions.

Example

stwat r3, r4, fc

Encoding

Binary Layout
0
0
RS
6
RA
11
FC
16
 
Format X-form
Opcode 0x7C00058C
Extension Base

Operands

  • RS
    Source General Purpose Register
  • RA
    Address General Purpose Register
  • FC
    Function Code