POOL32F 010101 |
fs |
fd |
00000 |
fmt |
RINT 000100000 |
6 |
5 |
5 |
5 |
2 |
9 |
RINT.fmt |
Floating-Point Round to Integral | |
RINT fd, fs |
microMIPS32 Release 6 |
Floating-Point Round to Integral |
Floating-Point Round to Integral
Scalar floating-point round to integral floating point value.
FPR[fd] =round_int(FPR[fs])
The scalar floating-point value in the register fs is rounded to an integral valued floating-point number in the same format based on the rounding mode bits RM in the FPU Control and Status Register FCSR. The result is written to fd.
The operands and results are values in floating-point data format fmt.
The RINT.fmt instruction corresponds to the roundToIntegralExact operation in the IEEE Standard for FloatingPoint Arithmetic 754TM-2008. The Inexact exception is signaled if the result does not have the same numerical value as the input operand.
The floating point scalar instruction RINT.fmt corresponds to the MSA vector instruction FRINT.df. I.e. RINT.S corresponds to FRINT.W, and RINT.D corresponds to FRINT.D.
Data-dependent exceptions are possible as specified by the IEEE Standard for Floating-Point Arithmetic 754TM2008.
This instruction is introduced by and required as of Release 6.
if not IsCoprocessorEnabled(1) then SignalException(CoprocessorUnusable, 1) endif if not IsFloatingPointImplemented(fmt)) then SignalException(ReservedInstruction) endif fin = ValueFPR(fs,fmt) ftmp =RoundIntFP(fin, fmt) if( fin != ftmp ) SignalFPException(InExact) StoreFPR (fd, fmt, ftmp ) function RoundIntFP(tt, n) /* Round to integer operation, using rounding mode FCSR.RM*/ endfunction RoundIntFP
Coprocessor Unusable, Reserved Instruction
Unimplemented Operation, Invalid Operation, Inexact, Overflow, Underflow