softfloat: use floatx80_infinity in softfloat

Since f3218a8 ("softfloat: add floatx80 constants")
floatx80_infinity is defined but never used.

This patch updates floatx80 functions to use
this definition.

This allows to define a different default Infinity
value on m68k: the m68k FPU defines infinity with
all bits set to zero in the mantissa.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20180224201802.911-4-laurent@vivier.eu>
This commit is contained in:
Laurent Vivier 2018-02-24 21:18:01 +01:00
parent 591596b77a
commit 0f605c889c
3 changed files with 50 additions and 16 deletions

View file

@ -177,6 +177,20 @@ floatx80 floatx80_default_nan(float_status *status)
return r;
}
/*----------------------------------------------------------------------------
| The pattern for a default generated extended double-precision inf.
*----------------------------------------------------------------------------*/
#define floatx80_infinity_high 0x7FFF
#if defined(TARGET_M68K)
#define floatx80_infinity_low LIT64(0x0000000000000000)
#else
#define floatx80_infinity_low LIT64(0x8000000000000000)
#endif
const floatx80 floatx80_infinity
= make_floatx80_init(floatx80_infinity_high, floatx80_infinity_low);
/*----------------------------------------------------------------------------
| The pattern for a default generated quadruple-precision NaN.
*----------------------------------------------------------------------------*/