[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patches] LIBDFP branch check-in



Hello.

I have checked in some changes to the LIBDFP branch.  The printf function
for dfp types now supports dfp rounding modes.  Since printf_dfp resides
in libc, a callback to fe_dec_getround was created and is initialized by
fe_decround.c when libdfp.so is loaded.  The printf function also
supports the %a conversion as specified by TR 24732 draft N1290, making
the printf_dfphex function obsolete.  The strtod function now correctly
handles zero with a non-zero exponent, and preserves significant
trailing zeroes.  The dfp versions of ldexp and frexp functions now have
numdigits.h implementations with libdecnumber fallback.



       * stdio-common/vfprintf.c(process_arg): Replaced occurrences of
       __printf_dfphex with __printf_dfp
       * dfp/sysdeps/powerpc/powerpc32/power6/fpu/Versions: Added 2.7
       * dfp/sysdeps/powerpc/powerpc64/power6/fpu/Versions: ditto
       * dfp/sysdeps/soft-dfp/Versions: ditto
       * dfp/sysdeps/dfp/Versions: ditto
       * dfp/Versions: ditto
       * dfp/Versions.def: ditto
       * dfp/sysdeps/powerpc/numdigits.h(left_justify): New function and
       helper functions.
       * dfp/sysdeps/powerpc/dfpu/numdigits.h: New file.
       * dfp/numdigits.h: New file.
       * dfp/sysdeps/powerpc/dfpu/fe_decround.c(__init_printf_dfp_getround):
       New function.
       * dfp/sysdeps/dfp/stdlib/strtod32.c: Changed FLOAT_ZERO to 0.DF.
       Modified fractional digits to keep significant zeroes and properly
       handle zero with non-zero exponent.
       * dfp/sysdeps/dfp/stdlib/strtod64.c: Changed FLOAT_ZERO to 0.DD.
       * dfp/sysdeps/dfp/stdlib/strtod128.c: Changed FLOAT_ZERO to 0.DL.
       * dfp/sysdeps/dfp/printf_dfphex.c: Deleted.
       * dfp/sysdeps/dfp/printf_dfp.c(__printf_dfp): Added callback for
       fe_dec_getround to facilitate correct rounding.  Added %a conversion.
       * dfp/sysdeps/dfp/fe_decround.c(__init_printf_dfp_getround): New
       function.
       * dfp/sysdeps/ieee754r/d32/ldexpd32.c: Added numdigits.h implementation
       with decnumber fallback.
       * dfp/sysdeps/ieee754r/d32/frexpd32.c: Modified numdigits.h
       implementation with decnumber fallback.
       * dfp/Makefile: Removed printf_dfphex.


--
Pete Eberlein
IBM Linux Technology Center
Linux for Power Toolchain