Assembly:

SUBU rd, rs, rt

nanoMIPS

Subtract (Untrapped)

Purpose:

Subtract (Untrapped). Subtract the 32-bit integer in register $rt from the 32-bit integer inregister $rs, placing the 32-bit result in register $rd, and not trapping on overflow.

Availability:

nanoMIPS

Format:

SUBU[32]

001000

rt

rs

rd

x

0111010

000

6

5

5

5

1

7

3

SUBU[16]

101100

rt3

rs3

rd3

1

6

3

3

3

1

rd = decode_gpr(rd3, 'gpr3')
rs = decode_gpr(rs3, 'gpr3')
rt = decode_gpr(rt3, 'gpr3')

Operation:

result = GPR[rs] -GPR[rt]
GPR[rd] = sign_extend(result, from_nbits=32)

Exceptions:

None.