lwat
Load Word Atomic
lwat RT,RA,FC
Loads a word from memory atomically.
Encoding
Binary Layout
18
0:5
LI
6:29
AA
30
LK
31
Operands
-
RT
Target General Purpose Register -
RA
Source General Purpose Register -
FC
Function Code
Example
lwat r3, r4, fc
Related
More in Base
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
Description
Loads a 32-bit word from memory at an address computed from RA with atomic semantics determined by function code FC. The loaded value is placed in GPR RT. This instruction requires alignment and may be restricted to hypervisor mode depending on FC value.
Operation
EA ← RA
RT ← [EA]
# Atomic load with fence behavior determined by FC
Programming Note
EA must be a multiple of 4, and the portion of mem(EA-4,12) accessed by the instruction must be contained within an aligned 32-byte block of storage. If either of these requirements is not satisfied, the system alignment error handler is invoked.