3.1.2 PC-Relative Addressing Mode

PC-relative addressing mode creates the effective address by adding a 32-bit immediate to the current program counter. It is used to access global variables, and automatically makes the code position independent (i.e. for shared libraries). These instructions are all two parcels in length.

Stores

Mnemonic Format Unit Semantics Description
spd wP mu slong(pc+pc_relative) = x.j Store PC-Relative Double
spw wP mu sword(pc+pc_relative) = x.i Store PC-Relative Word
sph wP mu shalf(pc+pc_relative) = x.i Store PC-Relative Halfword
spb wP mu sbyte(pc+pc_relative) = x.i Store PC-Relative Byte


Load With Sign Extension

Mnemonic Format Unit Semantics Description
lpd fP mu x.j = slong(pc+pc_relative) Load PC-Relative Double
lpw fP mu x.i = sword(pc+pc_relative) sex Load PC-Relative Word
lph fP mu x.i = shalf(pc+pc_relative) sex Load PC-Relative Halfword
lpb fP mu x.i = sbyte(pc+pc_relative) sex Load PC-Relative Byte


Load With Zero Extension

Mnemonic Format Unit Semantics Description
lpuw fP mu x.i = uword(pc+pc_relative) zrx Load PC-Relative Unsigned Word
lpuh fP mu x.i = uhalf(pc+pc_relative) zrx Load PC-Relative Unsigned Halfword
lpub fP mu x.i = ubyte(pc+pc_relative) zrx Load PC-Relative Unsigned Byte