Encoding:

POOL32F

010101

ft

fs

fd

fmt

SELEQZ fmt

000111000

POOL32F

010101

ft

fs

fd

fmt

SELNEZ fmt

001111000

6

5

5

5

2

9

Format:

SELEQZ.fmt SELNEQZ.fmt 

Select floating point value or zero with FPR condition.

SELEQZ.S fd,fs,ft

microMIPS32 Release 6

Select floating point value or zero with FPR condition.

SELEQZ.D fd,fs,ft

microMIPS32 Release 6

Select floating point value or zero with FPR condition.

SELNEZ.S fd,fs,ft

microMIPS32 Release 6

Select floating point value or zero with FPR condition.

SELNEZ.D fd,fs,ft

microMIPS32 Release 6

Select floating point value or zero with FPR condition.

Purpose:

Select floating point value or zero with FPR condition.

Description:

SELEQZ.fmt: FPR[fd] = FPR[ft].bit0 ? 0 : FPR[fs]
SELNEZ.fmt: FPR[fd] = FPR[ft].bit0 ? FPR[fs]: 0

If the condition is true, the value of fs is written to fd.

If the condition is false, the value that has all bits zero is written to fd.

This instruction has floating point formats S and D, but these specify only the width of the operands. Format S can be used for 32-bit W data, and format D can be used for 64 bit L data. The condition test is restricted to bit 0 of FPR ft.

Other bits are ignored.

This instruction has no execution exception behavior. It does not trap on NaNs. It does not set the FPU Cause bits.

Restrictions:

FPR fd destination register bits beyond the format width are UNPREDICTABLE. For example, if fmt is S, then fd bits 0-31 are defined, but bits 32 and above are UNPREDICTABLE. If fmt is D, then fd bits 0-63 are defined.

Availability and Compatibility:

These instructions are 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(ft, UNINTERPRETED_WORD)
SELEQZ: cond = tmp.bit0 = 0
SELNEZ: cond = tmp.bit0 != 0
if cond then
   tmp = ValueFPR(fs, fmt)
else
   tmp = 0 /* all bits set to zero */
endif
StoreFPR(fd, fmt, tmp)

Exceptions:

Coprocessor Unusable, Reserved Instruction

Floating Point Exceptions: