Encoding:

EXTEND

11110

imm 10:5

imm 15:11

ADDIUPC

00001

rx

0

000

imm 4:0

5

6

5

5

3

3

5

Format:

ADDIU rx, pc, immediate

MIPS16e

Add Immediate Unsigned Word (3-Operand, PC-Relative, Extended)

Purpose:

Add Immediate Unsigned Word (3-Operand, PC-Relative, Extended)

To add a constant to the program counter.

Description:

GPR[rx] = PC + immediate

The 16-bitimmediate is sign-extended and added to the address of the ADDIU instruction. Before the addition,the two lower bits of the instruction address are cleared.

The result of the addition is placed in GPR rx.

No integer overfl w exception occurs under any circumstances.

Restrictions:

A PC-relative, extended ADDIU may not be placed in the delay slot of a jump instruction.

Operation:

temp = (PCGPRLEN-1..2 || 02) + sign_extend(immediate)
GPR[Xlat(rx)] = temp

Exceptions:

None

Programming Notes:

The term "unsigned" in the instruction name is a misnomer;this operation is 32-bit modulo arithmetic that does not trap on overfl w. It is appropriate for unsigned arithmetic, such as address arithmetic, or integer arithmetic environments that ignore overfl w, such as C language arithmetic.

The assembler LA (Load Address) pseudo-instruction is implemented as a PC-relative add.