• A
    softfloat: fix float*_scalnb() corner cases · 326b9e98
    Aurelien Jarno 提交于
    float*_scalnb() were not taking into account all cases. This patch fixes
    some corner cases:
    - NaN values in input were not properly propagated and the invalid flag
      not correctly raised. Use propagateFloat*NaN() for that.
    - NaN or infinite values in input of floatx80_scalnb() were not correctly
      detected due to a typo.
    - The sum of exponent and n could overflow, leading to strange results.
      Additionally having int16 defined to int make that happening for a very
      small range of values. Fix that by saturating n to the maximum exponent
      range, and using an explicit wider type if needed.
    Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
    Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
    326b9e98
softfloat.c 228.1 KB
新手
引导
客服 返回
顶部