For memory access instructions, instructions typically use an address register with an offset. Something like a form: load R1, [R2 + 8] . ARM, x86, MIPS and many others offer this mode. It is often possible to use a PC as an address register in order to be able to display the constants that are next to the code.
For jump instructions, in addition to using the address register, you often have an offset that does not use any register, but jumps the X instructions forward or backward. The offset is usually limited in the range and can be shifted by a certain amount (limiting addresses that are multiples of 2, 4 ...), so it can fit into a small direct operand.
MIPS also uses a combination between absolute and relative jumps: the j command goes to the absolute address, but in the area of ββthe current instruction. To be precise, the immediate address is missing a few high bits (so that it can fit), and use the high bits of the current PC instead.
source share