[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 04/14] target-mips: use softfloat constants when
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH 04/14] target-mips: use softfloat constants when possible |
Date: |
Wed, 10 Oct 2012 13:09:49 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 |
On 10/09/2012 01:27 PM, Aurelien Jarno wrote:
> softfloat already has a few constants defined, use them instead of
> redefining them in target-mips.
>
> Rename FLOAT_SNAN32 and FLOAT_SNAN64 to FP_TO_INT32_OVERFLOW and
> FP_TO_INT64_OVERFLOW as even if they have the same value, they are
> technically different (and defined differently in the MIPS ISA).
>
> Remove the unused constants.
>
> Signed-off-by: Aurelien Jarno <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
> @@ -2495,8 +2491,9 @@ uint64_t helper_float_cvtl_d(CPUMIPSState *env,
> uint64_t fdt0)
> set_float_exception_flags(0, &env->active_fpu.fp_status);
> dt2 = float64_to_int64(fdt0, &env->active_fpu.fp_status);
> update_fcr31(env);
> - if (GET_FP_CAUSE(env->active_fpu.fcr31) & (FP_OVERFLOW | FP_INVALID))
> - dt2 = FLOAT_SNAN64;
> + if (GET_FP_CAUSE(env->active_fpu.fcr31) & (FP_OVERFLOW | FP_INVALID)) {
> + dt2 = FP_TO_INT64_OVERFLOW;
> + }
> return dt2;
That said, the existing code you're patching is incorrect.
This code will fold to OVERFLOW if any previous operation caused an overflow,
not checking that the *current* operation caused an overflow.
r~
- Re: [Qemu-devel] [PATCH 07/14] target-mips: simplify load/store microMIPS helpers, (continued)
- [Qemu-devel] [PATCH 01/14] softfloat: implement fused multiply-add NaN propagation for MIPS, Aurelien Jarno, 2012/10/09
- [Qemu-devel] [PATCH 03/14] target-mips: fix FPU exceptions, Aurelien Jarno, 2012/10/09
- [Qemu-devel] [PATCH 14/14] target-mips: don't flush extra TLB on permissions upgrade, Aurelien Jarno, 2012/10/09
- [Qemu-devel] [PATCH 12/14] target-mips: use deposit instead of hardcoded version, Aurelien Jarno, 2012/10/09
- [Qemu-devel] [PATCH 13/14] target-mips: fix TLBR wrt SEGMask, Aurelien Jarno, 2012/10/09
- [Qemu-devel] [PATCH 04/14] target-mips: use softfloat constants when possible, Aurelien Jarno, 2012/10/09
- Re: [Qemu-devel] [PATCH 04/14] target-mips: use softfloat constants when possible,
Richard Henderson <=
- [Qemu-devel] [PATCH 05/14] target-mips: cleanup load/store operations, Aurelien Jarno, 2012/10/09
- [Qemu-devel] [PATCH 11/14] target-mips: optimize ddiv/ddivu/div/divu with movcond, Aurelien Jarno, 2012/10/09
- [Qemu-devel] [PATCH 06/14] target-mips: optimize load operations, Aurelien Jarno, 2012/10/09
- [Qemu-devel] [PATCH 02/14] target-mips: use the softfloat floatXX_muladd functions, Aurelien Jarno, 2012/10/09
- [Qemu-devel] [PATCH 10/14] target-mips: implement movn/movz using movcond, Aurelien Jarno, 2012/10/09