[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH v4 9/9] target-mips: Clean up order of helpers for CVT
From: |
Aleksandar Markovic |
Subject: |
[Qemu-ppc] [PATCH v4 9/9] target-mips: Clean up order of helpers for CVT.<L|W>.<S|D> |
Date: |
Tue, 12 Apr 2016 14:58:11 +0200 |
From: Aleksandar Markovic <address@hidden>
This patch makes position of helpers for CVT.<L|W>.<S|D> consistent with
position of helpers for <CEIL|FLOOR|ROUND|TRUNC>.<L|W>.<S|D>.
Signed-off-by: Aleksandar Markovic <address@hidden>
---
target-mips/op_helper.c | 60 +++++++++++++++++++++++------------------------
1 file changed, 30 insertions(+), 30 deletions(-)
diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c
index 841f066..6b3d5bd 100644
--- a/target-mips/op_helper.c
+++ b/target-mips/op_helper.c
@@ -2693,32 +2693,6 @@ uint64_t helper_float_cvtd_l(CPUMIPSState *env, uint64_t
dt0)
return fdt2;
}
-uint64_t helper_float_cvt_l_d(CPUMIPSState *env, uint64_t fdt0)
-{
- uint64_t dt2;
-
- dt2 = float64_to_int64(fdt0, &env->active_fpu.fp_status);
- if (get_float_exception_flags(&env->active_fpu.fp_status)
- & (float_flag_invalid | float_flag_overflow)) {
- dt2 = FP_TO_INT64_OVERFLOW;
- }
- update_fcr31(env, GETPC());
- return dt2;
-}
-
-uint64_t helper_float_cvt_l_s(CPUMIPSState *env, uint32_t fst0)
-{
- uint64_t dt2;
-
- dt2 = float32_to_int64(fst0, &env->active_fpu.fp_status);
- if (get_float_exception_flags(&env->active_fpu.fp_status)
- & (float_flag_invalid | float_flag_overflow)) {
- dt2 = FP_TO_INT64_OVERFLOW;
- }
- update_fcr31(env, GETPC());
- return dt2;
-}
-
uint64_t helper_float_cvtps_pw(CPUMIPSState *env, uint64_t dt0)
{
uint32_t fst2;
@@ -2801,11 +2775,37 @@ uint32_t helper_float_cvts_pu(CPUMIPSState *env,
uint32_t wth0)
return wt2;
}
-uint32_t helper_float_cvt_w_s(CPUMIPSState *env, uint32_t fst0)
+uint64_t helper_float_cvt_l_d(CPUMIPSState *env, uint64_t fdt0)
+{
+ uint64_t dt2;
+
+ dt2 = float64_to_int64(fdt0, &env->active_fpu.fp_status);
+ if (get_float_exception_flags(&env->active_fpu.fp_status)
+ & (float_flag_invalid | float_flag_overflow)) {
+ dt2 = FP_TO_INT64_OVERFLOW;
+ }
+ update_fcr31(env, GETPC());
+ return dt2;
+}
+
+uint64_t helper_float_cvt_l_s(CPUMIPSState *env, uint32_t fst0)
+{
+ uint64_t dt2;
+
+ dt2 = float32_to_int64(fst0, &env->active_fpu.fp_status);
+ if (get_float_exception_flags(&env->active_fpu.fp_status)
+ & (float_flag_invalid | float_flag_overflow)) {
+ dt2 = FP_TO_INT64_OVERFLOW;
+ }
+ update_fcr31(env, GETPC());
+ return dt2;
+}
+
+uint32_t helper_float_cvt_w_d(CPUMIPSState *env, uint64_t fdt0)
{
uint32_t wt2;
- wt2 = float32_to_int32(fst0, &env->active_fpu.fp_status);
+ wt2 = float64_to_int32(fdt0, &env->active_fpu.fp_status);
if (get_float_exception_flags(&env->active_fpu.fp_status)
& (float_flag_invalid | float_flag_overflow)) {
wt2 = FP_TO_INT32_OVERFLOW;
@@ -2814,11 +2814,11 @@ uint32_t helper_float_cvt_w_s(CPUMIPSState *env,
uint32_t fst0)
return wt2;
}
-uint32_t helper_float_cvt_w_d(CPUMIPSState *env, uint64_t fdt0)
+uint32_t helper_float_cvt_w_s(CPUMIPSState *env, uint32_t fst0)
{
uint32_t wt2;
- wt2 = float64_to_int32(fdt0, &env->active_fpu.fp_status);
+ wt2 = float32_to_int32(fst0, &env->active_fpu.fp_status);
if (get_float_exception_flags(&env->active_fpu.fp_status)
& (float_flag_invalid | float_flag_overflow)) {
wt2 = FP_TO_INT32_OVERFLOW;
--
1.7.9.5
- [Qemu-ppc] [PATCH v4 0/9] target-mips: Initiate IEEE 754-2008 support, Aleksandar Markovic, 2016/04/12
- [Qemu-ppc] [PATCH v4 3/9] softfloat: For Mips only, correct order in pickNaNMulAdd(), Aleksandar Markovic, 2016/04/12
- [Qemu-ppc] [PATCH v4 5/9] softfloat: Clean up white spaces in softfloat-specialize.h, Aleksandar Markovic, 2016/04/12
- [Qemu-ppc] [PATCH v4 4/9] softfloat: Clean up hex constants capitalization in softfloat-specialize.h, Aleksandar Markovic, 2016/04/12
- [Qemu-ppc] [PATCH v4 2/9] softfloat: For Mips only, correct default NaN values, Aleksandar Markovic, 2016/04/12
- [Qemu-ppc] [PATCH v4 9/9] target-mips: Clean up order of helpers for CVT.<L|W>.<S|D>,
Aleksandar Markovic <=
- [Qemu-ppc] [PATCH v4 6/9] target-mips: Activate IEEE 274-2008 support, Aleksandar Markovic, 2016/04/12
- [Qemu-ppc] [PATCH v4 7/9] target-mips: Add abs2008 flavor of <ABS|NEG>.<S|D>, Aleksandar Markovic, 2016/04/12
- [Qemu-ppc] [PATCH v4 8/9] target-mips: Add nan2008 flavor of <CEIL|CVT|FLOOR|ROUND|TRUNC>.<L|W>.<S|D>, Aleksandar Markovic, 2016/04/12
- [Qemu-ppc] [PATCH v4 1/9] softfloat: Implement run-time-configurable meaning of signaling NaN bit, Aleksandar Markovic, 2016/04/12
- Re: [Qemu-ppc] [PATCH v4 1/9] softfloat: Implement run-time-configurable meaning of signaling NaN bit, Leon Alrae, 2016/04/13
- Re: [Qemu-ppc] [PATCH v4 1/9] softfloat: Implement run-time-configurable meaning of signaling NaN bit, Leon Alrae, 2016/04/14