MSA 011110 |
110010110 |
df |
ws |
wd |
2RF 011110 |
6 |
9 |
1 |
5 |
5 |
6 |
FRINT.df |
Vector Floating-Point Round to Integer | |
FRINT.W wd,ws |
MSA |
Vector Floating-Point Round to Integer |
FRINT.D wd,ws |
MSA |
Vector Floating-Point Round to Integer |
Vector Floating-Point Round to Integer
Vector floating-point round to integer.
wd[i] = round_int(ws[i])
The floating-point elements in vector ws are rounded to an integral valued floating-point number in the same format based on the rounding mode bits RM in MSA Control and Status Register MSACSR. The result is written to vector wd.
The round to integer operation is exact as defined by the IEEE Standard for Floating-Point Arithmetic 754TM-2008, i.e. the Inexact exception is signaled if the result does not have the same numerical value as the input operand.
The operands and results are values in floating-point data format df.
Data-dependent exceptions are poss ible as s pecified by the I EEE Standard for Floating-Point Arithmetic 754TM2008.
FRINT.W for i in 0 .. WRLEN/32-1 f = RoundIntFP(WR[ws]32i+31..32i, 32) WR[wd]32i+31..32i = f endfor FRINT.D for i in 0 .. WRLEN/64-1 f = RoundIntFP(WR[ws]64i+63..64i, 64) WR[wd]64i+63..64i = f endfor function RoundIntFP(tt, n) /* Implementation defined round to integer operation. */ endfunction RoundIntFP
Reserved Instruction Exception, MSA Disabled Exception, MSA Floating Point Exception.