Assembly:

MUL dst, src1, src2

nanoMIPS, availability varies by format.

Multiply

Purpose:

Multiply. Multiply signed word values in registers $src1 and $src2, and place bits 31..0 ofthe result in register $dst.

Availability:

nanoMIPS, availability varies by format.

Format:

MUL[32]

001000

rt

rs

rd

x

0000011

000

6

5

5

5

1

7

3

dst = rd
src1 = rs
src2 = rt
not_in_mms = False

MUL[4X4], not available in NMS

001111

rt4[3]

0

rt4[2:0]

rs4[3]

1

rs4[2:0]

6

1

1

3

1

1

3

dst = decode_gpr(rt4, 'gpr4')
src1 = decode_gpr(rt4, 'gpr4')
src2 = decode_gpr(rs4, 'gpr4')
not_in_mms = True

Operation:

if not_in_mms and C0.Config5.NMS == 1:
    raise exception('RI')
result = GPR[src1] * GPR[src2]
GPR[dst] = sign_extend(result, from_nbits=32)

Exceptions:

Reserved Instruction for MUL[4X4] format on NMS cores.