pla

Prefixed Load Address (Pseudo)

pla RT, label

Pseudo-instruction for paddi with R=1. Loads the address of a label.

Encoding

Binary Layout
1
0:5
2
6:7
R
8
0
9:13
D0
14:31
14
32:37
RT
38:42
0
43:47
D1
48:63
 
Format Pseudo
Opcode 0x0600000038000000
Extension Prefixed

Operands

  • RT
    Target Register
  • label
    Symbol Name

Example

pla r3, my_var

// Get address of my_var without TOC.

Registers Altered

PC

Related

More in Prefixed

Reference

Description

Pseudo-instruction that loads the address of a label into RT. It is an assembly-time alias for 'paddi RT, 0, label, 1', where R=1 selects PC-relative addressing. This is a 64-bit prefixed instruction available only on compatible processors.

Operation

RT ← CIA + sign_extend(label_offset, 34)

Programming Note

The pla instruction is used to load the address of a label into a register, effectively calculating the absolute address of the target. This is useful for setting up pointers or addresses dynamically. Ensure that the label is correctly defined and accessible in your code. The instruction operates at the same privilege level as the current execution context.