APPENDIX A MIPS III INSTRUCTION SET DETAILS
558 Preliminary Users Manual S15543EJ1V0UM
SUB Subtract SUB
rs
SPECIAL
0 0 0 0 0 0 rt rd 0
0 0 0 0 0

SUB

1 0 0 0 1 0

31 26 25 21 20 16 15 11 10 6 5 0
6 5555 6
Format:
SUB rd, rs, rt
Description:
The contents of general register
rt
are subtracted from the contents of general register
rs
to form a result. The
result is placed into general register
rd.
In 64-bit mode, the operands must be valid sign-extended, 32-bit values.
The only difference between this instruction and the SUBU instruction is that SUBU never traps on overflow.
An integer overflow exception takes place if the carries out of bits 30 and 31 differ (2's complement overflow). The
destination register
rd
is not modified when an integer overflow exception occurs.
Operation:
32 T: GPR [rd] GPR [rs] - GPR [rt]
64 T: temp GPR [rs] - GPR [rt]
GPR [rd] (temp31)32 || temp31...0
Exceptions:
Integer overflow exception