about summary refs log tree commit diff
path: root/sysdeps/mips/fpu/roundf_to_integer.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/mips/fpu/roundf_to_integer.h')
-rw-r--r--sysdeps/mips/fpu/roundf_to_integer.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdeps/mips/fpu/roundf_to_integer.h b/sysdeps/mips/fpu/roundf_to_integer.h
index 089322072e..f1a7fefda9 100644
--- a/sysdeps/mips/fpu/roundf_to_integer.h
+++ b/sysdeps/mips/fpu/roundf_to_integer.h
@@ -27,6 +27,7 @@ enum round_mode
 {
   CEIL,
   FLOOR,
+  TRUNC,
 };
 
 static inline float
@@ -47,6 +48,10 @@ round_to_integer_float (enum round_mode mode, float x)
   case FLOOR:
     asm ("floor.l.s %0, %0" : "+f" (r));
     break;
+  case TRUNC:
+    asm ("trunc.l.s %0, %0" : "+f" (r));
+    break;
+    break;
   }
   libc_fesetenvf (&fe);