MIPS R6 introduced the following instruction:
Floating-Point Round to Integral
Scalar floating-point round to integral floating point value.
RINT.fmt: FPR[fd] = round_int(FPR[fs])
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/10958/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
                        break;
                }
 
+               case frint_op: {
+                       union ieee754sp fs;
+
+                       if (!cpu_has_mips_r6)
+                               return SIGILL;
+
+                       SPFROMREG(fs, MIPSInst_FS(ir));
+                       rv.l = ieee754sp_tlong(fs);
+                       rv.s = ieee754sp_flong(rv.l);
+                       goto copcsr;
+               }
+
                case fabs_op:
                        handler.u = ieee754sp_abs;
                        goto scopuop;
                        break;
                }
 
+               case frint_op: {
+                       union ieee754dp fs;
+
+                       if (!cpu_has_mips_r6)
+                               return SIGILL;
+
+                       DPFROMREG(fs, MIPSInst_FS(ir));
+                       rv.l = ieee754dp_tlong(fs);
+                       rv.d = ieee754dp_flong(rv.l);
+                       goto copcsr;
+               }
+
                case fabs_op:
                        handler.u = ieee754dp_abs;
                        goto dcopuop;