Stores consecutive bytes from consecutive registers into a specified location in memory.
The stswx and stsx instructions store N consecutive bytes starting with the leftmost byte in register RS at the effective address (EA) from general-purpose register (GPR) RS through GPR RS + NR - 1.
If GPR RA is not 0, the EA is the sum of the contents of GPR RA and the contents of GPR RB. If GPR RA is 0, then EA is the contents of GPR RB.
Consider the following when using the stswx and stsx instructions:
For the POWER instruction stsx, the contents of the MQ Register are undefined.
The stswx and stsx 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 bytes contained in GPR 6 to GPR 7 into the specified bytes of a location in memory:
.csect data[rw] buffer: .long 0,0,0 # Assume GPR 5 contains 0x0000 0007. # Assume GPR 4 contains the address of buffer. # Assume GPR 6 contains 0x4865 6C6C. # Assume GPR 7 contains 0x6F20 776F. # The Fixed-Point Exception Register bits 25-31 contain 6. .csect text[pr] stswx 6,4,5 # buffer+0x7 now contains 0x4865 6C6C 6F20.
Fixed-Point String Instructions.