SPECIAL 000000 |
rs |
rt |
0 00 0000 0000 |
MULT 011000 |
6 |
5 |
5 |
10 |
6 |
MULT rs, rt |
MIPS32, removed in Release 6 |
Multiply Word |
Multiply Word
To multiply 32-bit signed integers.
(HI, LO) = GPR[rs] x GPR[rt]
The 32-bit word value in GPR rt is multiplied by the 32-bit value in GPR rs, treating both operands as signed values, to produce a 64-bit result. The low-order 32-bit word of the result is sign-extended and placed into special register
LO, and the high-order 32-bit word is sign-extended and placed into special register HI.
No arithmetic exception occurs under any circumstances.
On 64-bit processors, 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.
The MULT instruction has been removed in Release 6. It has been replaced by the Multiply Low (MUL) and Multiply
High (MUH) instructions, whose output is written to a single GPR. Refer to the 'MUL' and 'MUH' instructions in this manual for more information.
if (NotWordValue(GPR[rs]) or NotWordValue(GPR[rt])) then UNPREDICTABLE endif prod = GPR[rs]31..0 x GPR[rt]31..0 LO = sign_extend(prod31..0) HI = sign_extend(prod63..32)
None
In some processors the integer multiply operation may proceed asynchronously and allow other CPU instructions to execute before it is complete. An attempt to read LO or HI before the results are written interlocks until the results are ready. Asynchronous execution does not affect the program result, but offers an opportunity for performance improvement by scheduling the multiply so that other instructions can execute in parallel.
Programs that require overflow detection must check for it explicitly.
Where the size of the operands are known, software should place the shorter operand in GPR rt. This may reduce the latency of the instruction on those processors which implement data-dependent instruction latencies.