From 3212edfa491e970255dd03c6991c868399c7be1d Mon Sep 17 00:00:00 2001 From: jsm28 Date: Thu, 15 Dec 2005 21:50:10 +0000 Subject: PR other/25028 * libgcc2.h (SF_SIZE, DF_SIZE, XF_SIZE, TF_SIZE): Define. * libgcc2.c (__floatdixf, __floatundixf, __floatditf, __floatunditf): Use #error if type sizes don't match requirements of implementation. (__floatdisf, __floatdidf): Unify. Possibly use XFmode or TFmode as wider floating-point type. Use #error if type sizes don't match requirements of implementation. Avoid overflow in computing Wtype_MAXp1_F * Wtype_MAXp1_F. When special casing conversion, shift one more bit. Cast 1 to DWtype or UDWtype for shifting. (__floatundisf, __floatundidf): Likewise. * config/ia64/hpux.h (XF_SIZE, TF_SIZE): Define. * config/ia64/ia64.c (ia64_init_libfuncs): Use _U_Qfcnvfxt_quad_to_quad and _U_Qfcnvxf_quad_to_quad for TFmode-TImode conversions. * doc/tm.texi (SF_SIZE, DF_SIZE, XF_SIZE, TF_SIZE): Document. testsuite: * gcc.dg/torture/fp-int-convert-timode.c: Only XFAIL for LP64 IA64 HP-UX. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108598 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/libgcc2.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'gcc/libgcc2.h') diff --git a/gcc/libgcc2.h b/gcc/libgcc2.h index 11a1d9a3ff8..f8056d66e14 100644 --- a/gcc/libgcc2.h +++ b/gcc/libgcc2.h @@ -79,6 +79,44 @@ extern short int __get_eh_table_version (struct exception_descriptor *); (BITS_PER_UNIT == 8 && LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 128) #endif +#ifndef SF_SIZE +#if LIBGCC2_HAS_SF_MODE +#define SF_SIZE FLT_MANT_DIG +#else +#define SF_SIZE 0 +#endif +#endif + +#ifndef DF_SIZE +#if LIBGCC2_HAS_DF_MODE +#if LIBGCC2_DOUBLE_TYPE_SIZE == 64 +#define DF_SIZE DBL_MANT_DIG +#elif LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 64 +#define DF_SIZE LDBL_MANT_DIG +#else +#define DF_SIZE 0 +#endif +#else +#define DF_SIZE 0 +#endif +#endif + +#ifndef XF_SIZE +#if LIBGCC2_HAS_XF_MODE +#define XF_SIZE LDBL_MANT_DIG +#else +#define XF_SIZE 0 +#endif +#endif + +#ifndef TF_SIZE +#if LIBGCC2_HAS_TF_MODE +#define TF_SIZE LDBL_MANT_DIG +#else +#define TF_SIZE 0 +#endif +#endif + #ifndef MIN_UNITS_PER_WORD #define MIN_UNITS_PER_WORD UNITS_PER_WORD #endif -- cgit v1.2.1