addu

Operands

$reg, $reg, [$reg / imm]

Add unsigned (no overflow trap) : Sets $t1 = $t2 + $t3. No exception is raised on overflow; the result wraps modulo 2^32. Despite the name, this works fine with signed values too when you don't need overflow detection.

Variants

  • Add unsigned (no overflow trap) : Sets $t1 = $t2 + $t3. No exception is raised on overflow; the result wraps modulo 2^32. Despite the name, this works fine with signed values too when you don't need overflow detection. addu $t1,$t2,$t3
  • ADDition Unsigned : set $t1 to ($t2 plus 32-bit immediate), no overflow addu $t1,$t2,100000
# Add 1 to the largest signed positive word without an overflow trap. Inspect $t2: 0x80000000.
li $t0, 0x7FFFFFFF
addu $t2, $t0, 1