stwat
Store Word Atomic
stwat RS,RA,FC
Stores a word atomically to memory.
Encoding
Binary Layout
0
0:5
RS
6:10
RA
11:15
FC
16:31
Operands
-
RS
Source General Purpose Register -
RA
Address General Purpose Register -
FC
Function Code
Example
stwat r3, r4, fc
Related
More in Base
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
Description
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.
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.