Encoding:

COP1

010001

fmt

0

00000

fs

fd

CVT.S

100000

6

5

5

5

5

6

Format:

CVT.S.fmt 

Floating Point Convert to Single Floating Point

CVT.S.D fd, fs

MIPS32

Floating Point Convert to Single Floating Point

CVT.S.W fd, fs

MIPS32

Floating Point Convert to Single Floating Point

CVT.S.L fd, fs

MIPS64, MIPS32 Release 2

Floating Point Convert to Single Floating Point

Purpose:

Floating Point Convert to Single Floating Point

To convert an FP or fixed point value to single FP.

Description:

 FPR[fd] = convert_and_round(FPR[fs])

The value in FPR fs, in format fmt, is converted to a value in single floating point format and rounded according to the current rounding mode in FCSR. The result is placed in FPR fd.

Restrictions:

The fields fs and fd must specify valid FPRs-fs for type fmt and fd for single floating point. If the fields are not valid, the result is UNPREDICTABLE.

The operand must be a value in format fmt; if it is not, the result is UNPREDICTABLE and the value of the operand

FPR becomes UNPREDICTABLE.

For CVT.S.L, the result of this instruction 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.

Operation:

StoreFPR(fd, S, ConvertFmt(ValueFPR(fs, fmt), fmt, S))

Exceptions:

Coprocessor Unusable, Reserved Instruction

Floating Point Exceptions:

Invalid Operation, Unimplemented Operation, Inexact, Overflow, Underflow