POOL32A 000000 |
rt |
rs |
rd |
0 |
ADDU 0101010000 |
6 |
5 |
5 |
5 |
1 |
10 |
ADDU rd, rs, rt |
microMIPS |
Add Unsigned Word |
Add Unsigned Word
To add 32-bit integers.
GPR[rd] = GPR[rs] + GPR[rt]
The 32-bit word value in GPR rt is added to the 32-bit value in GPR rs and the 32-bit arithmetic result is signextended and placed into GPR rd.
No Integer Overflow exception occurs under any circumstances.
If either GPR rt or GPR rs does not contain sign-extended 32-bit values (bits 63..31 equal), then the result of the operation is UNPREDICTABLE.
if NotWordValue(GPR[rs]) or NotWordValue(GPR[rt]) then UNPREDICTABLE endif temp = GPR[rs] + GPR[rt] GPR[rd] = 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.