SPECIAL2 011100 |
rs |
rt |
0 00000 |
0 00000 |
MSUB 000100 |
6 |
5 |
5 |
5 |
5 |
6 |
MSUB rs, rt |
MIPS32, removed in Release 6 |
Multiply and Subtract Word to Hi, Lo |
Multiply and Subtract Word to Hi, Lo
To multiply two words and subtract the result from HI, LO.
(HI,LO) = (HI,LO) - (GPR[rs] x GPR[rt])
The 32-bit word value in GPR rs is multiplied by the 32-bit value in GPR rt, treating both operands as signed values, to produce a 64-bit result. The product is subtracted from the 64-bit concatenated values of HI31..0 and LO31..0. The most significant 32 bits of the result are sign-extended and written into HI and the least significant 32 bits are signextended and written into LO. No arithmetic exception occurs under any circumstances.
No restrictions in any architecture releases except Release 6.
If GPRs rs or rt do not contain sign-extended 32-bit values (bits 63..31 equal), then the results of the operation are
UNPREDICTABLE.
This instruction does not provide the capability of writing directly to a target GPR.
This instruction has been removed in Release 6.
if NotWordValue(GPR[rs]) or NotWordValue(GPR[rt]) then UNPREDICTABLE endif temp = (HI31..0 || LO31..0) - (GPR[rs]31..0 x GPR[rt]31..0) HI = sign_extend(temp63..32) LO = sign_extend(temp31..0)
None
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.