addiu

Operands

$reg, $reg, [imm / LO(id)]

Add immediate unsigned (no overflow trap) : Sets $t1 = $t2 + immediate. The immediate is a signed 16-bit value sign-extended to 32 bits; no overflow exception is raised. Despite the name the immediate is sign-extended, not zero-extended. The most common add-immediate instruction.

Variants

  • Add immediate unsigned (no overflow trap) : Sets $t1 = $t2 + immediate. The immediate is a signed 16-bit value sign-extended to 32 bits; no overflow exception is raised. Despite the name the immediate is sign-extended, not zero-extended. The most common add-immediate instruction. addiu $t1,$t2,-100
  • ADDition Immediate Unsigned: set $t1 to ($t2 plus 32-bit immediate), no overflow addiu $t1,$t2,100000
  • Add Lower Address : Set $t1 to $t2 plus the lower 16 bits of label's address addiu $t1,$t2,%lo(label)
# Add immediate 1 across the signed boundary without trapping. Inspect $t2: 0x80000000.
li $t0, 0x7FFFFFFF
addiu $t2, $t0, 1