pstd

Prefixed Store Doubleword

pstd RS, D34(RA), R

Stores a 64-bit value to memory using a 34-bit immediate offset.

Formerly listed on this site as pststd; the old address leads here. Renamed to pstd, the name Power ISA v3.1C and binutils give this instruction at this encoding; pststd is in neither.

Encoding

Binary Layout
1
0:5
0
6:7
0
8
/
9:10
R
11
/
12:13
d0
14:31
61
32:37
RS
38:42
RA
43:47
d1
48:63
 
Format 8LS:D-form
Opcode 0x04000000F4000000
Extension Prefixed

Operands

  • RS
    Source Register
  • D34
    34-bit Displacement
  • RA
    Base Register
  • R
    PC-Relative Flag

Example

pstd r3, label@pcrel(0), 1

// Store value to label.

Registers Altered

PC

Related

More in Prefixed

Reference

Description

Stores a 64-bit doubleword from RS to memory at the address calculated from RA plus a 34-bit immediate displacement. When R=1, the displacement is PC-relative; when R=0, it is treated as absolute. This is a 64-bit prefixed instruction from the Prefixed extension.

Operation

if R = 1 then
  EA ← (RA | 0 if RA=0) + sign_extend(D34, 34) + CIA
else
  EA ← (RA | 0 if RA=0) + sign_extend(D34, 34)
[EA] ← RS

Programming Note

The pstd instruction stores a doubleword from the source register to memory. It uses the Program Counter (PC) or an effective address calculated from the base register and displacement. Ensure proper alignment for optimal performance; unaligned accesses may incur penalties. This instruction operates at user privilege level.