lq

Load Quadword

lq RTp, DQ(RA)

Loads 128 bits into two adjacent GPRs (Even/Odd pair).

Details

For lq, the quadword in storage addressed by EA is loaded into an even-odd pair of GPRs. In Big-Endian mode, the even-numbered GPR is loaded with the doubleword from storage addressed by EA and the odd-numbered GPR is loaded with the doubleword addressed by EA+8. In Little-Endian mode, the even-numbered GPR is loaded with the byte-reversed doubleword from storage addressed by EA+8 and the odd-numbered GPR is loaded with the byte-reversed doubleword addressed by EA.

Pseudocode Operation

if 'lq' then
    EA ← (RA|0) + EXTS64(DQ||0b0000)
    if Big-Endian byte ordering then
        RTp||RTp+1 ← MEM(EA,16)
    if Little-Endian byte ordering then
        RTp||RTp+1 ← MEM(EA,16)

Programming Note

The lq and stq instructions exist primarily to permit software to access quadwords in storage “atomically”.

Example

lq r4, 0(r4)

Encoding

Binary Layout
56
0
RTp
6
RA
11
DQ
16
/
28
 
Format DQ-form
Opcode 0xE0000000
Extension Base

Operands

  • RTp
    Target Pair
  • DQ
    Disp
  • RA
    Base
  • disp
    Displacement value
  • EA
    Effective Address