ADDU $X,$Y,$Z | ADDU $X,$Y,Z |
SUBU $X,$Y,$Z | SUBU $X,$Y,Z |
MULU $X,$Y,$Z | MULU $X,$Y,Z |
DIVU $X,$Y,$Z | DIVU $X,$Y,Z |
Specification:
ADDU: u($X) | ← (u($Y) + u($Z)) mod 264 | ||||||||||||
SUBU: u($X) | ← (u($Y) -u($Z)) mod 264 | ||||||||||||
MULU: u(rH $X) | ← u($Y) * u($Z) | ||||||||||||
DIVU: |
If, however, rD ≥ $Z, then the result of the division would be greater than 264 and the quotient will not be computed. Instead, rD is stored in $X and $Y is stored in rR. In Donald Knuth's "The Art of Computer Programming", Volume 2, "Seminumerical Algorithms", Chapter 4.3.1 will explain how to use this instruction to implement division of high-precision numbers with 128 bit or more.
| ||||||||||||
All instructions exist in two variants. The second operand can either be a register $Z or an immediate value Z.
Timing:
ADDU: 1υ
SUBU: 1υ
MULU: 10υ
DIVU: 60υ
Description:
These instructions perform arithmetic operations on unsigned numbers. They never cause overflow or other exceptions, not even if dividing by zero.
See also: