SPECIAL 000000 |
rs |
rt |
rd |
0 00000 |
DSUB 101110 |
6 |
5 |
5 |
5 |
5 |
6 |
DSUB rd, rs, rt |
MIPS64 |
Doubleword Subtract |
Doubleword Subtract
To subtract 64-bit integers; trap on overflow
GPR[rd] = GPR[rs] - GPR[rt]
The 64-bit doubleword value in GPR rt is subtracted from the 64-bit value in GPR rs to produce a 64-bit result. If the subtraction results in 64-bit 2's complement arithmetic overflow, then the destination register is not modified and an
Integer Overflow exception occurs. If it does not overflow, the 64-bit result is placed into GPR rd.
temp = (GPR[rs]63||GPR[rs]) - (GPR[rt]63||GPR[rt]) if (temp64 != temp63) then SignalException(IntegerOverflow) else GPR[rd] = temp63..0 endif
Integer Overflow, Reserved Instruction
DSUBU performs the same arithmetic operation but does not trap on overflow.