ADDIU32 001100 |
rt |
rs |
immediate |
6 |
5 |
5 |
16 |
ADDIU rt, rs, immediate |
microMIPS |
Add Immediate Unsigned Word |
Add Immediate Unsigned Word
To add a constant to a 32-bit integer.
GPR[rt] = GPR[rs] + immediate
The 16-bit signed immediate is added to the 32-bit value in GPR rs and the 32-bit arithmetic result is sign-extended and placed into GPR rt.
No Integer Overflow exception occurs under any circumstances.
If GPR rs does not contain a sign-extended 32-bit value (bits 63..31 equal), then the result of the operation is
UNPREDICTABLE.
if NotWordValue(GPR[rs]) then UNPREDICTABLE endif temp = GPR[rs] + sign_extend(immediate) GPR[rt] = sign_extend(temp31..0)
None
The term "unsigned" in the instruction name is a misnomer; this operation is 32-bit modulo arithmetic that does not trap on overflow. This instruction is appropriate for unsigned arithmetic, such as address arithmetic, or integer arithmetic environments that ignore overflow, such as C language arithmetic.