diff options
author | Janis Johnson <janis187@us.ibm.com> | 2007-09-11 01:11:16 +0000 |
---|---|---|
committer | Janis Johnson <janis@gcc.gnu.org> | 2007-09-11 01:11:16 +0000 |
commit | f3d110ef046e4dd98a82ba8a6365427181c16b1e (patch) | |
tree | 200c6b2a83392535448b0fad1e529f6969081b6a /gcc/doc | |
parent | 9fc777ad2561e542ef0eec9d94ee8cb5edc68554 (diff) | |
download | gcc-f3d110ef046e4dd98a82ba8a6365427181c16b1e.zip gcc-f3d110ef046e4dd98a82ba8a6365427181c16b1e.tar.gz gcc-f3d110ef046e4dd98a82ba8a6365427181c16b1e.tar.bz2 |
re PR c/30013 (Multiple flaws in decimal floating-point arithmetic conversions fixed)
gcc/
PR c/30013
* config/dfp-bit.c: Don't skip TFmode conversions; move strto*
declarations to top.
(DFP_TO_BFP): Use for either XFmode or TFmode.
(BFP_TO_DFP): Use for either XFmode or TFmode; always use cast
of BFP_VIA_TYPE.
* config/dfp-bit.h: Include float.h.
(LONG_DOUBLE_HAS_XF_MODE, LONG_DOUBLE_HAS_TF_MODE): Define if long
double is one of these modes, rather than using LIBGCC_HAS_*F_MODE
which doesn't mean the same thing.
(BFP_KIND): Use 4 to mean TFmode.
(BFP_FMT): Specify the number of decimal digits based on the
number of mantissa digits.
(BFP_VIA_TYPE): Binary float type to use as cast for sprintf.
(BFP_TO_DFP, DFP_TO_BFP): Define names for TFmode variants.
(STR_TO_BFP): Use strtold for XFmode or TFmode.
(TFtype): Define if TFmode is supported.
* doc/libgcc.texi (Decimal float library routines): Document
TF conversion functions.
gcc/testsuite/
* gcc.dg/dfp/convert-bfp.c: Replace SKIP_LONG_DOUBLE with runtime
checks for size of long double.
* gcc.dg/dfp/convert.h: New file.
* gcc.dg/dfp/convert-bfp-2.c: New test.
* gcc.dg/dfp/convert-bfp-3.c: Ditto.
* gcc.dg/dfp/convert-bfp-4.c: Ditto.
* gcc.dg/dfp/convert-bfp-5.c: Ditto.
* gcc.dg/dfp/convert-bfp-6.c: Ditto.
* gcc.dg/dfp/convert-bfp-7.c: Ditto.
* gcc.dg/dfp/convert-bfp-8.c: Ditto.
* gcc.dg/dfp/convert-bfp-9.c: Ditto.
* gcc.dg/dfp/convert-bfp-10.c: Ditto.
* gcc.dg/dfp/convert-bfp-11.c: Ditto.
From-SVN: r128361
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/libgcc.texi | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/doc/libgcc.texi b/gcc/doc/libgcc.texi index 161cfc6..e977b24 100644 --- a/gcc/doc/libgcc.texi +++ b/gcc/doc/libgcc.texi @@ -585,8 +585,12 @@ to another. @deftypefnx {Runtime Function} _Decimal32 __bid_truncdfsd (double @var{a}) @deftypefnx {Runtime Function} _Decimal32 __dpd_truncxfsd ({long double} @var{a}) @deftypefnx {Runtime Function} _Decimal32 __bid_truncxfsd ({long double} @var{a}) +@deftypefnx {Runtime Function} _Decimal32 __dpd_trunctfsd ({long double} @var{a}) +@deftypefnx {Runtime Function} _Decimal32 __bid_trunctfsd ({long double} @var{a}) @deftypefnx {Runtime Function} _Decimal64 __dpd_truncxfdd ({long double} @var{a}) @deftypefnx {Runtime Function} _Decimal64 __bid_truncxfdd ({long double} @var{a}) +@deftypefnx {Runtime Function} _Decimal64 __dpd_trunctfdd ({long double} @var{a}) +@deftypefnx {Runtime Function} _Decimal64 __bid_trunctfdd ({long double} @var{a}) These functions convert the value of @var{a} from a binary floating type to a decimal floating type of a different size. @end deftypefn @@ -605,6 +609,10 @@ to a decimal floating type of a different size. @deftypefnx {Runtime Function} {long double} __bid_extendddxf (_Decimal64 @var{a}) @deftypefnx {Runtime Function} {long double} __dpd_trunctdxf (_Decimal128 @var{a}) @deftypefnx {Runtime Function} {long double} __bid_trunctdxf (_Decimal128 @var{a}) +@deftypefnx {Runtime Function} {long double} __dpd_extendsdtf (_Decimal32 @var{a}) +@deftypefnx {Runtime Function} {long double} __bid_extendsdtf (_Decimal32 @var{a}) +@deftypefnx {Runtime Function} {long double} __dpd_extendddtf (_Decimal64 @var{a}) +@deftypefnx {Runtime Function} {long double} __bid_extendddtf (_Decimal64 @var{a}) These functions convert the value of @var{a} from a decimal floating type to a binary floating type of a different size. @end deftypefn @@ -613,10 +621,14 @@ to a binary floating type of a different size. @deftypefnx {Runtime Function} _Decimal32 __bid_extendsfsd (float @var{a}) @deftypefnx {Runtime Function} _Decimal64 __dpd_extenddfdd (double @var{a}) @deftypefnx {Runtime Function} _Decimal64 __bid_extenddfdd (double @var{a}) +@deftypefnx {Runtime Function} _Decimal128 __dpd_extendtftd ({long double} @var{a}) +@deftypefnx {Runtime Function} _Decimal128 __bid_extendtftd ({long double} @var{a}) @deftypefnx {Runtime Function} float __dpd_truncsdsf (_Decimal32 @var{a}) @deftypefnx {Runtime Function} float __bid_truncsdsf (_Decimal32 @var{a}) @deftypefnx {Runtime Function} double __dpd_truncdddf (_Decimal64 @var{a}) @deftypefnx {Runtime Function} double __bid_truncdddf (_Decimal64 @var{a}) +@deftypefnx {Runtime Function} {long double} __dpd_trunctdtf (_Decimal128 @var{a}) +@deftypefnx {Runtime Function} {long double} __bid_trunctdtf (_Decimal128 @var{a}) These functions convert the value of @var{a} between decimal and binary floating types of the same size. @end deftypefn |