Revision 2d627737 target-arm/helper.c

b/target-arm/helper.c
2528 2528
/* floating point conversion */
2529 2529
float64 VFP_HELPER(fcvtd, s)(float32 x, CPUState *env)
2530 2530
{
2531
    return float32_to_float64(x, &env->vfp.fp_status);
2531
    float64 r = float32_to_float64(x, &env->vfp.fp_status);
2532
    /* ARM requires that S<->D conversion of any kind of NaN generates
2533
     * a quiet NaN by forcing the most significant frac bit to 1.
2534
     */
2535
    return float64_maybe_silence_nan(r);
2532 2536
}
2533 2537

  
2534 2538
float32 VFP_HELPER(fcvts, d)(float64 x, CPUState *env)
2535 2539
{
2536
    return float64_to_float32(x, &env->vfp.fp_status);
2540
    float32 r =  float64_to_float32(x, &env->vfp.fp_status);
2541
    /* ARM requires that S<->D conversion of any kind of NaN generates
2542
     * a quiet NaN by forcing the most significant frac bit to 1.
2543
     */
2544
    return float32_maybe_silence_nan(r);
2537 2545
}
2538 2546

  
2539 2547
/* VFP3 fixed point conversion.  */

Also available in: Unified diff