Fix floating point to integer conversion, by Aurelien Jarno.
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>
Sat, 10 Feb 2007 22:58:02 +0000 (22:58 +0000)
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>
Sat, 10 Feb 2007 22:58:02 +0000 (22:58 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2413 c046a42c-6fe2-441c-8c8c-71466251a162

target-sparc/op.c

index 1ec15d28b1376f27669883f1fc36d510068c1574..fd30e90e1f2a62a6eccba35874dbf8e09874dc96 100644 (file)
@@ -1472,23 +1472,23 @@ void OPPROTO op_fstod(void)
 /* Float to integer conversion.  */
 void OPPROTO op_fstoi(void)
 {
-    *((int32_t *)&FT0) = float32_to_int32(FT1, &env->fp_status);
+    *((int32_t *)&FT0) = float32_to_int32_round_to_zero(FT1, &env->fp_status);
 }
 
 void OPPROTO op_fdtoi(void)
 {
-    *((int32_t *)&FT0) = float64_to_int32(DT1, &env->fp_status);
+    *((int32_t *)&FT0) = float64_to_int32_round_to_zero(DT1, &env->fp_status);
 }
 
 #ifdef TARGET_SPARC64
 void OPPROTO op_fstox(void)
 {
-    *((int64_t *)&DT0) = float32_to_int64(FT1, &env->fp_status);
+    *((int64_t *)&DT0) = float32_to_int64_round_to_zero(FT1, &env->fp_status);
 }
 
 void OPPROTO op_fdtox(void)
 {
-    *((int64_t *)&DT0) = float64_to_int64(DT1, &env->fp_status);
+    *((int64_t *)&DT0) = float64_to_int64_round_to_zero(DT1, &env->fp_status);
 }
 
 void OPPROTO op_fmovs_cc(void)