stq

Store Quadword

stq RSp, DQ(RA)

Stores a quadword from two general-purpose registers into memory.

Details

The stq instruction stores the contents of register pair RSp and RSp+1 into memory at an effective address calculated from register RA and the displacement DS.

Pseudocode Operation

if 'stq' then
    EA ←(RA|0) + EXTS64(DS||0b00)
    if Big-Endian byte ordering then
        MEM(EA,16) ←(RSp)||(RSp+1)
    if Little-Endian byte ordering then
        MEM(EA,16) ←(RSp)||(RSp+1)

Programming Note

In versions of the architecture prior to V. 2.07, this instruction was privileged.

Example

stq r4, 0(r4)

Encoding

Binary Layout
1
0
RSp
6
RA
11
DS
16
0
21
0
22
0
23
0
24
0
25
0
26
0
27
0
28
0
29
0
30
0
31
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
 
Format DQ-form
Opcode 0xF8000002
Extension Base

Operands

  • RSp
    Src Pair
  • DQ
    Disp
  • RA
    Base
  • disp
    Displacement value