re PR target/19930 (gcc.dg/pr19402-2.c fails on ia64-hpux)

PR target/19930
	* doc/tm.texi (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Document.
	(LIBGCC2_HAS_DF_MODE): New.
	(LIBGCC2_HAS_XF_MODE): New.
	(LIBGCC2_HAS_TF_MODE): New.
	* libgcc2.h (LIBGCC2_HAS_XF_MODE): New name for HAVE_XFMODE.
	(LIBGCC2_HAS_TF_MODE): New name for HAVE_TFMODE.
	* libgcc2.c (LIBGCC2_HAS_XF_MODE): New name for HAVE_XFMODE.
	(LIBGCC2_HAS_TF_MODE): New name for HAVE_TFMODE.
	(LIBGCC2_HAS_DF_MODE): New name for HAVE_DFMODE.
	* config/ia64/t-ia64 (LIB1ASMFUNCS): Remove __compat
	and add _fixtfdi, _fixunstfdi, _floatditf
	* lib1funcs.asm: Remove L__compat. Add L_fixtfdi,
	L_fixunstfdi, L_floatditf.
	* config/ia64/hpux.h (LIBGCC2_HAS_XF_MODE): Define.
	(LIBGCC2_HAS_TF_MODE): Define.

From-SVN: r95548
This commit is contained in:
Steve Ellcey 2005-02-25 21:34:49 +00:00 committed by Steve Ellcey
parent 736c86ad83
commit 4e9db8b235
7 changed files with 102 additions and 34 deletions

View File

@ -1,3 +1,22 @@
2005-02-25 Steve Ellcey <sje@cup.hp.com>
PR target/19930
* doc/tm.texi (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Document.
(LIBGCC2_HAS_DF_MODE): New.
(LIBGCC2_HAS_XF_MODE): New.
(LIBGCC2_HAS_TF_MODE): New.
* libgcc2.h (LIBGCC2_HAS_XF_MODE): New name for HAVE_XFMODE.
(LIBGCC2_HAS_TF_MODE): New name for HAVE_TFMODE.
* libgcc2.c (LIBGCC2_HAS_XF_MODE): New name for HAVE_XFMODE.
(LIBGCC2_HAS_TF_MODE): New name for HAVE_TFMODE.
(LIBGCC2_HAS_DF_MODE): New name for HAVE_DFMODE.
* config/ia64/t-ia64 (LIB1ASMFUNCS): Remove __compat
and add _fixtfdi, _fixunstfdi, _floatditf
* lib1funcs.asm: Remove L__compat. Add L_fixtfdi,
L_fixunstfdi, L_floatditf.
* config/ia64/hpux.h (LIBGCC2_HAS_XF_MODE): Define.
(LIBGCC2_HAS_TF_MODE): Define.
2005-02-25 Diego Novillo <dnovillo@redhat.com>
PR tree-optimization/20204

View File

@ -202,3 +202,11 @@ do { \
#define TARGET_INIT_LIBFUNCS ia64_hpux_init_libfuncs
#define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) ((MODE) == TFmode)
/* Put all *xf routines in libgcc, regardless of long double size. */
#undef LIBGCC2_HAS_XF_MODE
#define LIBGCC2_HAS_XF_MODE 1
/* Put all *tf routines in libgcc, regardless of long double size. */
#undef LIBGCC2_HAS_TF_MODE
#define LIBGCC2_HAS_TF_MODE 1

View File

@ -706,9 +706,8 @@ __ia64_trampoline:
.endp __ia64_trampoline
#endif
#ifdef L__compat
// Thunks for backward compatibility.
#ifdef L_fixtfdi
.text
.align 16
.global __fixtfti
@ -719,7 +718,8 @@ __fixtfti:
;;
}
.endp __fixtfti
#endif
#ifdef L_fixunstfdi
.align 16
.global __fixunstfti
.proc __fixunstfti
@ -729,7 +729,8 @@ __fixunstfti:
;;
}
.endp __fixunstfti
#endif
#if L_floatditf
.align 16
.global __floattitf
.proc __floattitf
@ -739,5 +740,4 @@ __floattitf:
;;
}
.endp __floattitf
#endif

View File

@ -8,7 +8,8 @@ LIB1ASMSRC = ia64/lib1funcs.asm
LIB1ASMFUNCS = __divxf3 __divdf3 __divsf3 \
__divdi3 __moddi3 __udivdi3 __umoddi3 \
__divsi3 __modsi3 __udivsi3 __umodsi3 __save_stack_nonlocal \
__nonlocal_goto __restore_stack_nonlocal __trampoline __compat
__nonlocal_goto __restore_stack_nonlocal __trampoline \
_fixtfdi _fixunstfdi _floatditf
# ??? Hack to get -P option used when compiling lib1funcs.asm, because Intel
# assembler does not accept # line number as a comment.

View File

@ -1635,6 +1635,36 @@ the target machine. If you don't define this, the default is two
words.
@end defmac
@defmac LIBGCC2_LONG_DOUBLE_TYPE_SIZE
Define this macro if @code{LONG_DOUBLE_TYPE_SIZE} is not constant or
if you want routines in @file{libgcc2.a} for a size other than
@code{LONG_DOUBLE_TYPE_SIZE}. If you don't define this, the
default is @code{LONG_DOUBLE_TYPE_SIZE}.
@end defmac
@defmac LIBGCC2_HAS_DF_MODE
Define this macro if neither @code{LIBGCC2_DOUBLE_TYPE_SIZE} nor
@code{LIBGCC2_LONG_DOUBLE_TYPE_SIZE} is
@code{DFmode} but you want @code{DFmode} routines in @file{libgcc2.a}
anyway. If you don't define this and either @code{LIBGCC2_DOUBLE_TYPE_SIZE}
or @code{LIBGCC2_LONG_DOUBLE_TYPE_SIZE} is 64 then the default is 1,
otherwise it is 0.
@end defmac
@defmac LIBGCC2_HAS_XF_MODE
Define this macro if @code{LIBGCC2_LONG_DOUBLE_TYPE_SIZE} is not
@code{XFmode} but you want @code{XFmode} routines in @file{libgcc2.a}
anyway. If you don't define this and @code{LIBGCC2_LONG_DOUBLE_TYPE_SIZE}
is 80 then the default is 1, otherwise it is 0.
@end defmac
@defmac LIBGCC2_HAS_TF_MODE
Define this macro if @code{LIBGCC2_LONG_DOUBLE_TYPE_SIZE} is not
@code{TFmode} but you want @code{TFmode} routines in @file{libgcc2.a}
anyway. If you don't define this and @code{LIBGCC2_LONG_DOUBLE_TYPE_SIZE}
is 128 then the default is 1, otherwise it is 0.
@end defmac
@defmac TARGET_FLT_EVAL_METHOD
A C expression for the value for @code{FLT_EVAL_METHOD} in @file{float.h},
assuming, if applicable, that the floating-point control word is in its

View File

@ -1155,7 +1155,7 @@ __ucmpdi2 (DWtype a, DWtype b)
}
#endif
#if defined(L_fixunstfdi) && defined(HAVE_TFMODE)
#if defined(L_fixunstfdi) && LIBGCC2_HAS_TF_MODE
DWtype
__fixunstfDI (TFtype a)
{
@ -1181,7 +1181,7 @@ __fixunstfDI (TFtype a)
}
#endif
#if defined(L_fixtfdi) && defined(HAVE_TFMODE)
#if defined(L_fixtfdi) && LIBGCC2_HAS_TF_MODE
DWtype
__fixtfdi (TFtype a)
{
@ -1191,7 +1191,7 @@ __fixtfdi (TFtype a)
}
#endif
#if defined(L_fixunsxfdi) && defined(HAVE_XFMODE)
#if defined(L_fixunsxfdi) && LIBGCC2_HAS_XF_MODE
DWtype
__fixunsxfDI (XFtype a)
{
@ -1217,7 +1217,7 @@ __fixunsxfDI (XFtype a)
}
#endif
#if defined(L_fixxfdi) && defined(HAVE_XFMODE)
#if defined(L_fixxfdi) && LIBGCC2_HAS_XF_MODE
DWtype
__fixxfdi (XFtype a)
{
@ -1227,7 +1227,7 @@ __fixxfdi (XFtype a)
}
#endif
#if defined(L_fixunsdfdi) && defined(HAVE_DFMODE)
#if defined(L_fixunsdfdi) && LIBGCC2_HAS_DF_MODE
DWtype
__fixunsdfDI (DFtype a)
{
@ -1246,7 +1246,7 @@ __fixunsdfDI (DFtype a)
}
#endif
#if defined(L_fixdfdi) && defined(HAVE_DFMODE)
#if defined(L_fixdfdi) && LIBGCC2_HAS_DF_MODE
DWtype
__fixdfdi (DFtype a)
{
@ -1260,7 +1260,7 @@ __fixdfdi (DFtype a)
DWtype
__fixunssfDI (SFtype a)
{
#if defined(HAVE_DFMODE)
#if LIBGCC2_HAS_DF_MODE
/* Convert the SFtype to a DFtype, because that is surely not going
to lose any bits. Some day someone else can write a faster version
that avoids converting to DFtype, and verify it really works right. */
@ -1330,7 +1330,7 @@ __fixsfdi (SFtype a)
}
#endif
#if defined(L_floatdixf) && defined(HAVE_XFMODE)
#if defined(L_floatdixf) && LIBGCC2_HAS_XF_MODE
XFtype
__floatdixf (DWtype u)
{
@ -1341,7 +1341,7 @@ __floatdixf (DWtype u)
}
#endif
#if defined(L_floatditf) && defined(HAVE_TFMODE)
#if defined(L_floatditf) && LIBGCC2_HAS_TF_MODE
TFtype
__floatditf (DWtype u)
{
@ -1352,7 +1352,7 @@ __floatditf (DWtype u)
}
#endif
#if defined(L_floatdidf) && defined(HAVE_DFMODE)
#if defined(L_floatdidf) && LIBGCC2_HAS_DF_MODE
DFtype
__floatdidf (DWtype u)
{
@ -1376,7 +1376,7 @@ __floatdisf (DWtype u)
f *= Wtype_MAXp1_F;
f += (UWtype)u;
return f;
#elif defined(HAVE_DFMODE)
#elif LIBGCC2_HAS_DF_MODE
#if LIBGCC2_DOUBLE_TYPE_SIZE == 64
#define DF_SIZE DBL_MANT_DIG
@ -1451,7 +1451,7 @@ __floatdisf (DWtype u)
}
#endif
#if defined(L_fixunsxfsi) && defined(HAVE_XFMODE)
#if defined(L_fixunsxfsi) && LIBGCC2_HAS_XF_MODE
/* Reenable the normal types, in case limits.h needs them. */
#undef char
#undef short
@ -1473,7 +1473,7 @@ __fixunsxfSI (XFtype a)
}
#endif
#if defined(L_fixunsdfsi) && defined(HAVE_DFMODE)
#if defined(L_fixunsdfsi) && LIBGCC2_HAS_DF_MODE
/* Reenable the normal types, in case limits.h needs them. */
#undef char
#undef short
@ -1521,9 +1521,9 @@ __fixunssfSI (SFtype a)
exponents. */
#if defined(L_powisf2) \
|| (defined(L_powidf2) && defined(HAVE_DFMODE)) \
|| (defined(L_powixf2) && defined(HAVE_XFMODE)) \
|| (defined(L_powitf2) && defined(HAVE_TFMODE))
|| (defined(L_powidf2) && LIBGCC2_HAS_DF_MODE) \
|| (defined(L_powixf2) && LIBGCC2_HAS_XF_MODE) \
|| (defined(L_powitf2) && LIBGCC2_HAS_TF_MODE)
# if defined(L_powisf2)
# define TYPE SFtype
# define NAME __powisf2
@ -1555,9 +1555,9 @@ NAME (TYPE x, Wtype m)
#endif
#if defined(L_mulsc3) || defined(L_divsc3) \
|| ((defined(L_muldc3) || defined(L_divdc3)) && defined(HAVE_DFMODE)) \
|| ((defined(L_mulxc3) || defined(L_divxc3)) && defined(HAVE_XFMODE)) \
|| ((defined(L_multc3) || defined(L_divtc3)) && defined(HAVE_TFMODE))
|| ((defined(L_muldc3) || defined(L_divdc3)) && LIBGCC2_HAS_DF_MODE) \
|| ((defined(L_mulxc3) || defined(L_divxc3)) && LIBGCC2_HAS_XF_MODE) \
|| ((defined(L_multc3) || defined(L_divtc3)) && LIBGCC2_HAS_TF_MODE)
#undef float
#undef double

View File

@ -58,6 +58,19 @@ extern short int __get_eh_table_version (struct exception_descriptor *);
#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE LONG_DOUBLE_TYPE_SIZE
#endif
#ifndef LIBGCC2_HAS_DF_MODE
#define LIBGCC2_HAS_DF_MODE \
(LIBGCC2_DOUBLE_TYPE_SIZE == 64 || LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 64)
#endif
#ifndef LIBGCC2_HAS_XF_MODE
#define LIBGCC2_HAS_XF_MODE (LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 80)
#endif
#ifndef LIBGCC2_HAS_TF_MODE
#define LIBGCC2_HAS_TF_MODE (LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 128)
#endif
#ifndef MIN_UNITS_PER_WORD
#define MIN_UNITS_PER_WORD UNITS_PER_WORD
#endif
@ -96,18 +109,15 @@ typedef unsigned int UTItype __attribute__ ((mode (TI)));
typedef float SFtype __attribute__ ((mode (SF)));
typedef _Complex float SCtype __attribute__ ((mode (SC)));
#if LIBGCC2_DOUBLE_TYPE_SIZE == 64 || LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 64
#define HAVE_DFMODE
#if LIBGCC2_HAS_DF_MODE
typedef float DFtype __attribute__ ((mode (DF)));
typedef _Complex float DCtype __attribute__ ((mode (DC)));
#endif
#if LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 80
#define HAVE_XFMODE
#if LIBGCC2_HAS_XF_MODE
typedef float XFtype __attribute__ ((mode (XF)));
typedef _Complex float XCtype __attribute__ ((mode (XC)));
#endif
#if LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 128
#define HAVE_TFMODE
#if LIBGCC2_HAS_TF_MODE
typedef float TFtype __attribute__ ((mode (TF)));
typedef _Complex float TCtype __attribute__ ((mode (TC)));
#endif
@ -329,7 +339,7 @@ extern SFtype __powisf2 (SFtype, Wtype);
extern SCtype __divsc3 (SFtype, SFtype, SFtype, SFtype);
extern SCtype __mulsc3 (SFtype, SFtype, SFtype, SFtype);
#ifdef HAVE_DFMODE
#if LIBGCC2_HAS_DF_MODE
extern DWtype __fixdfdi (DFtype);
extern DFtype __floatdidf (DWtype);
extern UWtype __fixunsdfSI (DFtype);
@ -339,7 +349,7 @@ extern DCtype __divdc3 (DFtype, DFtype, DFtype, DFtype);
extern DCtype __muldc3 (DFtype, DFtype, DFtype, DFtype);
#endif
#ifdef HAVE_XFMODE
#if LIBGCC2_HAS_XF_MODE
extern DWtype __fixxfdi (XFtype);
extern DWtype __fixunsxfDI (XFtype);
extern XFtype __floatdixf (DWtype);
@ -349,7 +359,7 @@ extern XCtype __divxc3 (XFtype, XFtype, XFtype, XFtype);
extern XCtype __mulxc3 (XFtype, XFtype, XFtype, XFtype);
#endif
#ifdef HAVE_TFMODE
#if LIBGCC2_HAS_TF_MODE
extern DWtype __fixunstfDI (TFtype);
extern DWtype __fixtfdi (TFtype);
extern TFtype __floatditf (DWtype);