abs
Absolute value
Sets $t1 to the absolute value of $t2.
Forms
Operands
$t1- Any general-purpose register,
$0to$31, using its numeric or named spelling, such as$8or$t0($zerois$0;$rais$31). $t2- A general-purpose register. It may be the same register as
$t1.
# Take the absolute value of -7. Inspect $t2: 7.
li $t0, -7
abs $t2, $t0