Stores a word of data from a general-purpose register into a specified location in memory.
Bits | Value |
---|---|
0-5 | 31 |
6-10 | RS |
11-15 | RA |
16-20 | RB |
21-30 | 151 |
31 | / |
PowerPC | |
---|---|
stwx | RS, RA, RB |
POWER family | |
---|---|
stx | RS, RA, RB |
The stwx and stx instructions store the contents of general-purpose register (GPR) RS into the word of storage addressed by the effective address (EA).
If GPR RA is not 0, the EA is the sum of the contents of GPR RA and GPR RB. If GPR RA is 0, then the EA is the contents of GPR RB.
The stwx and stx instructions have one syntax form and do not affect the Fixed-Point Exception Register or Condition Register Field 0.
RS | Specifies source general-purpose register of stored data. |
RA | Specifies source general-purpose register for EA calculation. |
RB | Specifies source general-purpose register for EA calculation. |
The following code stores the contents of GPR 6 into a location in memory:
.csect data[pr] buffer: .long 0 # Assume GPR 4 contains the address of buffer. # Assume GPR 6 contains 0x4865 6C6C. .csect text[pr] stwx 6,0,4 # Buffer now contains 0x4865 6C6C.
Fixed-Point Load and Store Instructions .