Encoding:

COP1

010001

fmt

S, D only

ft

fs

fd

SEL

010000

6

5

5

5

5

6

Format:

SEL.fmt 

Select floating point values with FPR condition

SEL.S fd,fs,ft

MIPS32 Release 6

Select floating point values with FPR condition

SEL.D fd,fs,ft

MIPS32 Release 6

Select floating point values with FPR condition

Purpose:

Select floating point values with FPR condition

Description:

FPR[fd] =FPR[fd].bit0 ? FPR[ft] : FPR[fs]

SEL fmt is a select operation, with a condition input in FPR fd, and 2 data inputs in FPRs ft and fs.

The condition input is specified by FPR fd, and is overwritten by the result.

The condition is true only if bit 0 of the condition input FPR fd is set. Other bits are ignored.

This instruction has floating point formats S and D, but these specify only the width of the operands. SEL.S can be used for 32-bit W data, and SEL.D can be used for 64 bit L data.

This instruction does not cause data-dependent exceptions. It does not trap on NaNs, and the FCSRCause and

FCSRFlags fields are not modified.

Restrictions:

None

Availability and Compatibility:

SEL fmt is introduced by and required as of MIPS32 Release 6.

Special Considerations:

Only formats S and D are valid. Other format values may be used to encode other instructions. Unused format encodings are required to signal the Reserved Instruction exception.

Operation:

tmp = ValueFPR(fd, UNINTERPRETED_WORD)
cond = tmp.bit0
if cond then
   tmp = ValueFPR(ft, fmt) 
else
   tmp = ValueFPR(fs, fmt)
endif
StoreFPR(fd, fmt, tmp)

Exceptions:

Coprocessor Unusable, Reserved Instruction

Floating Point Exceptions:

None