Encoding:

COP1

010001

fmt

ft

fs

fd

SUB

000001

6

5

5

5

5

6

Format:

SUB.fmt 

Floating Point Subtract

SUB.S fd, fs, ft

MIPS32

Floating Point Subtract

SUB.D fd, fs, ft

MIPS32

Floating Point Subtract

SUB.PS fd, fs, ft

MIPS64, MIPS32 Release 2, removed in Release 6

Floating Point Subtract

Purpose:

Floating Point Subtract

To subtract FP values.

Description:

 FPR[fd] = FPR[fs] - FPR[ft]

The value in FPR ft is subtracted from the value in FPR fs. The result is calculated to infinite precision, rounded according to the current rounding mode in FCSR, and placed into FPR fd. The operands and result are values in format fmt. SUB.PS subtracts the upper and lower halves of FPR fs and FPR ft independently, and ORs together any generated exceptional conditions.

Restrictions:

The fields fs, ft, and fd must specify FPRs valid for operands of type fmt. If the fields are not valid, the result is

UNPREDICTABLE.

The operands must be values in format fmt; if they are not, the result is UNPREDICTABLE and the value of the operand FPRs becomes UNPREDICTABLE.

The result of SUB.PS is UNPREDICTABLE if the processor is executing in the FR=0 32-bit FPU register model; it is predictable if executing on a 64-bit FPU in the FR=1 mode, but not with FR=0, and not on a 32-bit FPU.

Availability and Compatibility:

SUB.PS has been removed in Release 6.

Operation:

StoreFPR (fd, fmt, ValueFPR(fs, fmt) -fmt ValueFPR(ft, fmt))

CPU Exceptions:

Coprocessor Unusable, Reserved Instruction

FPU Exceptions:

Inexact, Overflow, Underflow, Invalid Op, Unimplemented Op