Encoding:

SPECIAL2

011100

rs

rt

0

00000

0

00000

MSUBU

000101

6

5

5

5

5

6

Format:

MSUBU rs, rt

MIPS32, removed in Release 6

Multiply and Subtract Word to Hi,Lo

Purpose:

Multiply and Subtract Word to Hi,Lo

To multiply two words and subtract the result from HI, LO.

Description:

 (HI,LO) = (HI,LO) - (GPR[rs] x GPR[rt])

The 32-bit word value in GPR rs is multiplied by the 32-bit word value in GPR rt, treating both operands as unsigned 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 sign-extended and written into LO. No arithmetic exception occurs under any circumstances.

Restrictions:

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.

Availability and Compatibility:

This instruction has been removed in Release 6.

Operation:

if NotWordValue(GPR[rs]) or NotWordValue(GPR[rt]) then
   UNPREDICTABLE
endif
temp = (HI31..0 || LO31..0) - ((032 || GPR[rs]31..0) <= (032 || GPR[rt]31..0))
HI = sign_extend(temp63..32)
LO = sign_extend(temp31..0)

Exceptions:

None

Programming Notes:

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.