Encoding:

MSA

011110

110010000

df

ws

wd

2RF

011110

6

9

1

5

5

6

Format:

FCLASS.df 

Vector Floating-Point Class Mask

FCLASS.W wd,ws

MSA

Vector Floating-Point Class Mask

FCLASS.D wd,ws

MSA

Vector Floating-Point Class Mask

Purpose:

Vector Floating-Point Class Mask

Vector floating-point class shown as a bit mask for Zero, Negative, Infinite, Subnormal, Quiet NaN, or Signaling

NaN.

Description:

wd[i] = class(ws[i])

Store in each element of v ector wd a bit mask reflecting the floating-point class of the correspo nding element of vector ws.

The mask has 10 bits as follows. Bits 0 and 1 indicate NaN values: signaling NaN (bit 0) and quiet NaN (bit 1). Bits

2, 3, 4, 5 classify negative values: infinity (bit 2), normal (bit 3), subnormal (bit 4), and zer o (bit 5). Bits 6, 7, 8, 9 classify positive values:infinity (bit 6), normal (bit 7), subnormal (bit 8), and zero (bit 9).

The input values and generated bit masks are not affected by the flush-to-zero bit FS in MSA Control and Status

Register MSACSR.

The operands are values in floating-point data format df. The results are values in integer data format df.

Restrictions:

No data-dependent exceptions are possible.

Operation:

FCLASS.W
   for i in 0 .. WRLEN/32-1
      c = ClassFP(WR[ws]32i+31..32i, 32)
      WR[wd]32i+31..32i = 022 || c9..0
   endfor
FCLASS.D
   for i in 0 .. WRLEN/64-1
      c = ClassFP(WR[ws]64i+63..64i, 64)
      WR[wd]64i+63..64i = 054 || c9..0
   endfor
function ClassFP(tt, n)
   /* Implementation defined class operation. */
endfunction ClassFP

Exceptions:

Reserved Instruction Exception, MSA Disabled Exception.