aboutsummaryrefslogblamecommitdiff
path: root/emulators/qemu/files/patch-fpu-softfloat-native.c
blob: 0a7f3018835c70d36347ff1cbdfa9160f478f119 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
















                                                                                
Index: qemu/fpu/softfloat-native.c
@@ -228,7 +228,15 @@
 *----------------------------------------------------------------------------*/
 float64 float64_trunc_to_int( float64 a STATUS_PARAM )
 {
+#if defined(__FreeBSD__) && __FreeBSD__ <= 4
+    float64 ret;
+    fpsetround(FP_RZ);
+    ret = rint(a);
+    fpsetround(STATUS(float_rounding_mode));
+    return ret;
+#else
     return trunc(a);
+#endif
 }
 
 float64 float64_round_to_int( float64 a STATUS_PARAM )