Encoding:

POOL32F

010101

ft

fs

fd

0

fmt

SUB fmt

01110000

6

5

5

5

1

2

8

Format:

SUB.fmt 

Floating Point Subtract

SUB.S fd, fs, ft

microMIPS

Floating Point Subtract

SUB.D fd, fs, ft

microMIPS

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.

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.

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