pla

Prefixed Load Address (Pseudo)

pla RT, label

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

Details

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.

Pseudocode 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.

Example

pla r3, my_var

// Get address of my_var without TOC.

Encoding

Binary Layout
1
0
2
6
R
8
0
9
D0
14
14
32
RT
38
0
43
D1
48
 
Format Pseudo
Opcode
Extension Prefixed
Registers Altered PC

Operands

  • RT
    Target Register
  • label
    Symbol Name