Assembly:

LAPC rt, address

Assembly alias. NMS cores restricted to 21 bit signed offset from PC.

Load Address, PC relative

Purpose:

Load Address, PC relative. Load PC relative address to register $rt.

Availability:

Assembly alias. NMS cores restricted to 21 bit signed offset from PC.

Expansion:

address = $PC + imm (imm in 21 bit signed range):
ADDIUPC[32] rt, imm
address = $PC + imm (imm in 32 bit signed range):
ADDIUPC[48] rt, imm

LAPC uses the ADDIUPC instruction to load a PC relative address into register $rt.In order to determine the correct immediate value for the ADDIUPC instruction, the assembler must assume a value

for the PC that the instruction will be executed from.If the instruction is executed from a different PC, then the generated address will be shifted by a PC relative amount.