Encoding:

POOL32F

010101

ft

fs

0

fmt

CVT.S

1101101

POOL32FXf

111011

6

5

5

1

2

7

6

Format:

CVT.S.fmt 

Floating Point Convert to Single Floating Point

CVT.S.D ft, fs

microMIPS

Floating Point Convert to Single Floating Point

CVT.S.W ft, fs

microMIPS

Floating Point Convert to Single Floating Point

CVT.S.L ft, fs

MIPS64, microMIPS

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[ft] = 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 ft.

Restrictions:

The fields fs and ft 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(ft, S, ConvertFmt(ValueFPR(fs, fmt), fmt, S))

Exceptions:

Coprocessor Unusable, Reserved Instruction

Floating Point Exceptions:

Invalid Operation, Unimplemented Operation, Inexact, Overflow, Underflow