Commit 4e9db8b2 by Steve Ellcey Committed by Steve Ellcey

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
parent 736c86ad
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> 2005-02-25 Diego Novillo <dnovillo@redhat.com>
PR tree-optimization/20204 PR tree-optimization/20204
......
...@@ -202,3 +202,11 @@ do { \ ...@@ -202,3 +202,11 @@ do { \
#define TARGET_INIT_LIBFUNCS ia64_hpux_init_libfuncs #define TARGET_INIT_LIBFUNCS ia64_hpux_init_libfuncs
#define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) ((MODE) == TFmode) #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
...@@ -706,9 +706,8 @@ __ia64_trampoline: ...@@ -706,9 +706,8 @@ __ia64_trampoline:
.endp __ia64_trampoline .endp __ia64_trampoline
#endif #endif
#ifdef L__compat
// Thunks for backward compatibility. // Thunks for backward compatibility.
#ifdef L_fixtfdi
.text .text
.align 16 .align 16
.global __fixtfti .global __fixtfti
...@@ -719,7 +718,8 @@ __fixtfti: ...@@ -719,7 +718,8 @@ __fixtfti:
;; ;;
} }
.endp __fixtfti .endp __fixtfti
#endif
#ifdef L_fixunstfdi
.align 16 .align 16
.global __fixunstfti .global __fixunstfti
.proc __fixunstfti .proc __fixunstfti
...@@ -729,7 +729,8 @@ __fixunstfti: ...@@ -729,7 +729,8 @@ __fixunstfti:
;; ;;
} }
.endp __fixunstfti .endp __fixunstfti
#endif
#if L_floatditf
.align 16 .align 16
.global __floattitf .global __floattitf
.proc __floattitf .proc __floattitf
...@@ -739,5 +740,4 @@ __floattitf: ...@@ -739,5 +740,4 @@ __floattitf:
;; ;;
} }
.endp __floattitf .endp __floattitf
#endif #endif
...@@ -8,7 +8,8 @@ LIB1ASMSRC = ia64/lib1funcs.asm ...@@ -8,7 +8,8 @@ LIB1ASMSRC = ia64/lib1funcs.asm
LIB1ASMFUNCS = __divxf3 __divdf3 __divsf3 \ LIB1ASMFUNCS = __divxf3 __divdf3 __divsf3 \
__divdi3 __moddi3 __udivdi3 __umoddi3 \ __divdi3 __moddi3 __udivdi3 __umoddi3 \
__divsi3 __modsi3 __udivsi3 __umodsi3 __save_stack_nonlocal \ __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 # ??? Hack to get -P option used when compiling lib1funcs.asm, because Intel
# assembler does not accept # line number as a comment. # assembler does not accept # line number as a comment.
......
...@@ -1635,6 +1635,36 @@ the target machine. If you don't define this, the default is two ...@@ -1635,6 +1635,36 @@ the target machine. If you don't define this, the default is two
words. words.
@end defmac @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 @defmac TARGET_FLT_EVAL_METHOD
A C expression for the value for @code{FLT_EVAL_METHOD} in @file{float.h}, 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 assuming, if applicable, that the floating-point control word is in its
......
...@@ -1155,7 +1155,7 @@ __ucmpdi2 (DWtype a, DWtype b) ...@@ -1155,7 +1155,7 @@ __ucmpdi2 (DWtype a, DWtype b)
} }
#endif #endif
#if defined(L_fixunstfdi) && defined(HAVE_TFMODE) #if defined(L_fixunstfdi) && LIBGCC2_HAS_TF_MODE
DWtype DWtype
__fixunstfDI (TFtype a) __fixunstfDI (TFtype a)
{ {
...@@ -1181,7 +1181,7 @@ __fixunstfDI (TFtype a) ...@@ -1181,7 +1181,7 @@ __fixunstfDI (TFtype a)
} }
#endif #endif
#if defined(L_fixtfdi) && defined(HAVE_TFMODE) #if defined(L_fixtfdi) && LIBGCC2_HAS_TF_MODE
DWtype DWtype
__fixtfdi (TFtype a) __fixtfdi (TFtype a)
{ {
...@@ -1191,7 +1191,7 @@ __fixtfdi (TFtype a) ...@@ -1191,7 +1191,7 @@ __fixtfdi (TFtype a)
} }
#endif #endif
#if defined(L_fixunsxfdi) && defined(HAVE_XFMODE) #if defined(L_fixunsxfdi) && LIBGCC2_HAS_XF_MODE
DWtype DWtype
__fixunsxfDI (XFtype a) __fixunsxfDI (XFtype a)
{ {
...@@ -1217,7 +1217,7 @@ __fixunsxfDI (XFtype a) ...@@ -1217,7 +1217,7 @@ __fixunsxfDI (XFtype a)
} }
#endif #endif
#if defined(L_fixxfdi) && defined(HAVE_XFMODE) #if defined(L_fixxfdi) && LIBGCC2_HAS_XF_MODE
DWtype DWtype
__fixxfdi (XFtype a) __fixxfdi (XFtype a)
{ {
...@@ -1227,7 +1227,7 @@ __fixxfdi (XFtype a) ...@@ -1227,7 +1227,7 @@ __fixxfdi (XFtype a)
} }
#endif #endif
#if defined(L_fixunsdfdi) && defined(HAVE_DFMODE) #if defined(L_fixunsdfdi) && LIBGCC2_HAS_DF_MODE
DWtype DWtype
__fixunsdfDI (DFtype a) __fixunsdfDI (DFtype a)
{ {
...@@ -1246,7 +1246,7 @@ __fixunsdfDI (DFtype a) ...@@ -1246,7 +1246,7 @@ __fixunsdfDI (DFtype a)
} }
#endif #endif
#if defined(L_fixdfdi) && defined(HAVE_DFMODE) #if defined(L_fixdfdi) && LIBGCC2_HAS_DF_MODE
DWtype DWtype
__fixdfdi (DFtype a) __fixdfdi (DFtype a)
{ {
...@@ -1260,7 +1260,7 @@ __fixdfdi (DFtype a) ...@@ -1260,7 +1260,7 @@ __fixdfdi (DFtype a)
DWtype DWtype
__fixunssfDI (SFtype a) __fixunssfDI (SFtype a)
{ {
#if defined(HAVE_DFMODE) #if LIBGCC2_HAS_DF_MODE
/* Convert the SFtype to a DFtype, because that is surely not going /* 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 to lose any bits. Some day someone else can write a faster version
that avoids converting to DFtype, and verify it really works right. */ that avoids converting to DFtype, and verify it really works right. */
...@@ -1330,7 +1330,7 @@ __fixsfdi (SFtype a) ...@@ -1330,7 +1330,7 @@ __fixsfdi (SFtype a)
} }
#endif #endif
#if defined(L_floatdixf) && defined(HAVE_XFMODE) #if defined(L_floatdixf) && LIBGCC2_HAS_XF_MODE
XFtype XFtype
__floatdixf (DWtype u) __floatdixf (DWtype u)
{ {
...@@ -1341,7 +1341,7 @@ __floatdixf (DWtype u) ...@@ -1341,7 +1341,7 @@ __floatdixf (DWtype u)
} }
#endif #endif
#if defined(L_floatditf) && defined(HAVE_TFMODE) #if defined(L_floatditf) && LIBGCC2_HAS_TF_MODE
TFtype TFtype
__floatditf (DWtype u) __floatditf (DWtype u)
{ {
...@@ -1352,7 +1352,7 @@ __floatditf (DWtype u) ...@@ -1352,7 +1352,7 @@ __floatditf (DWtype u)
} }
#endif #endif
#if defined(L_floatdidf) && defined(HAVE_DFMODE) #if defined(L_floatdidf) && LIBGCC2_HAS_DF_MODE
DFtype DFtype
__floatdidf (DWtype u) __floatdidf (DWtype u)
{ {
...@@ -1376,7 +1376,7 @@ __floatdisf (DWtype u) ...@@ -1376,7 +1376,7 @@ __floatdisf (DWtype u)
f *= Wtype_MAXp1_F; f *= Wtype_MAXp1_F;
f += (UWtype)u; f += (UWtype)u;
return f; return f;
#elif defined(HAVE_DFMODE) #elif LIBGCC2_HAS_DF_MODE
#if LIBGCC2_DOUBLE_TYPE_SIZE == 64 #if LIBGCC2_DOUBLE_TYPE_SIZE == 64
#define DF_SIZE DBL_MANT_DIG #define DF_SIZE DBL_MANT_DIG
...@@ -1451,7 +1451,7 @@ __floatdisf (DWtype u) ...@@ -1451,7 +1451,7 @@ __floatdisf (DWtype u)
} }
#endif #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. */ /* Reenable the normal types, in case limits.h needs them. */
#undef char #undef char
#undef short #undef short
...@@ -1473,7 +1473,7 @@ __fixunsxfSI (XFtype a) ...@@ -1473,7 +1473,7 @@ __fixunsxfSI (XFtype a)
} }
#endif #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. */ /* Reenable the normal types, in case limits.h needs them. */
#undef char #undef char
#undef short #undef short
...@@ -1521,9 +1521,9 @@ __fixunssfSI (SFtype a) ...@@ -1521,9 +1521,9 @@ __fixunssfSI (SFtype a)
exponents. */ exponents. */
#if defined(L_powisf2) \ #if defined(L_powisf2) \
|| (defined(L_powidf2) && defined(HAVE_DFMODE)) \ || (defined(L_powidf2) && LIBGCC2_HAS_DF_MODE) \
|| (defined(L_powixf2) && defined(HAVE_XFMODE)) \ || (defined(L_powixf2) && LIBGCC2_HAS_XF_MODE) \
|| (defined(L_powitf2) && defined(HAVE_TFMODE)) || (defined(L_powitf2) && LIBGCC2_HAS_TF_MODE)
# if defined(L_powisf2) # if defined(L_powisf2)
# define TYPE SFtype # define TYPE SFtype
# define NAME __powisf2 # define NAME __powisf2
...@@ -1555,9 +1555,9 @@ NAME (TYPE x, Wtype m) ...@@ -1555,9 +1555,9 @@ NAME (TYPE x, Wtype m)
#endif #endif
#if defined(L_mulsc3) || defined(L_divsc3) \ #if defined(L_mulsc3) || defined(L_divsc3) \
|| ((defined(L_muldc3) || defined(L_divdc3)) && defined(HAVE_DFMODE)) \ || ((defined(L_muldc3) || defined(L_divdc3)) && LIBGCC2_HAS_DF_MODE) \
|| ((defined(L_mulxc3) || defined(L_divxc3)) && defined(HAVE_XFMODE)) \ || ((defined(L_mulxc3) || defined(L_divxc3)) && LIBGCC2_HAS_XF_MODE) \
|| ((defined(L_multc3) || defined(L_divtc3)) && defined(HAVE_TFMODE)) || ((defined(L_multc3) || defined(L_divtc3)) && LIBGCC2_HAS_TF_MODE)
#undef float #undef float
#undef double #undef double
......
...@@ -58,6 +58,19 @@ extern short int __get_eh_table_version (struct exception_descriptor *); ...@@ -58,6 +58,19 @@ extern short int __get_eh_table_version (struct exception_descriptor *);
#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE LONG_DOUBLE_TYPE_SIZE #define LIBGCC2_LONG_DOUBLE_TYPE_SIZE LONG_DOUBLE_TYPE_SIZE
#endif #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 #ifndef MIN_UNITS_PER_WORD
#define MIN_UNITS_PER_WORD UNITS_PER_WORD #define MIN_UNITS_PER_WORD UNITS_PER_WORD
#endif #endif
...@@ -96,18 +109,15 @@ typedef unsigned int UTItype __attribute__ ((mode (TI))); ...@@ -96,18 +109,15 @@ typedef unsigned int UTItype __attribute__ ((mode (TI)));
typedef float SFtype __attribute__ ((mode (SF))); typedef float SFtype __attribute__ ((mode (SF)));
typedef _Complex float SCtype __attribute__ ((mode (SC))); typedef _Complex float SCtype __attribute__ ((mode (SC)));
#if LIBGCC2_DOUBLE_TYPE_SIZE == 64 || LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 64 #if LIBGCC2_HAS_DF_MODE
#define HAVE_DFMODE
typedef float DFtype __attribute__ ((mode (DF))); typedef float DFtype __attribute__ ((mode (DF)));
typedef _Complex float DCtype __attribute__ ((mode (DC))); typedef _Complex float DCtype __attribute__ ((mode (DC)));
#endif #endif
#if LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 80 #if LIBGCC2_HAS_XF_MODE
#define HAVE_XFMODE
typedef float XFtype __attribute__ ((mode (XF))); typedef float XFtype __attribute__ ((mode (XF)));
typedef _Complex float XCtype __attribute__ ((mode (XC))); typedef _Complex float XCtype __attribute__ ((mode (XC)));
#endif #endif
#if LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 128 #if LIBGCC2_HAS_TF_MODE
#define HAVE_TFMODE
typedef float TFtype __attribute__ ((mode (TF))); typedef float TFtype __attribute__ ((mode (TF)));
typedef _Complex float TCtype __attribute__ ((mode (TC))); typedef _Complex float TCtype __attribute__ ((mode (TC)));
#endif #endif
...@@ -329,7 +339,7 @@ extern SFtype __powisf2 (SFtype, Wtype); ...@@ -329,7 +339,7 @@ extern SFtype __powisf2 (SFtype, Wtype);
extern SCtype __divsc3 (SFtype, SFtype, SFtype, SFtype); extern SCtype __divsc3 (SFtype, SFtype, SFtype, SFtype);
extern SCtype __mulsc3 (SFtype, SFtype, SFtype, SFtype); extern SCtype __mulsc3 (SFtype, SFtype, SFtype, SFtype);
#ifdef HAVE_DFMODE #if LIBGCC2_HAS_DF_MODE
extern DWtype __fixdfdi (DFtype); extern DWtype __fixdfdi (DFtype);
extern DFtype __floatdidf (DWtype); extern DFtype __floatdidf (DWtype);
extern UWtype __fixunsdfSI (DFtype); extern UWtype __fixunsdfSI (DFtype);
...@@ -339,7 +349,7 @@ extern DCtype __divdc3 (DFtype, DFtype, DFtype, DFtype); ...@@ -339,7 +349,7 @@ extern DCtype __divdc3 (DFtype, DFtype, DFtype, DFtype);
extern DCtype __muldc3 (DFtype, DFtype, DFtype, DFtype); extern DCtype __muldc3 (DFtype, DFtype, DFtype, DFtype);
#endif #endif
#ifdef HAVE_XFMODE #if LIBGCC2_HAS_XF_MODE
extern DWtype __fixxfdi (XFtype); extern DWtype __fixxfdi (XFtype);
extern DWtype __fixunsxfDI (XFtype); extern DWtype __fixunsxfDI (XFtype);
extern XFtype __floatdixf (DWtype); extern XFtype __floatdixf (DWtype);
...@@ -349,7 +359,7 @@ extern XCtype __divxc3 (XFtype, XFtype, XFtype, XFtype); ...@@ -349,7 +359,7 @@ extern XCtype __divxc3 (XFtype, XFtype, XFtype, XFtype);
extern XCtype __mulxc3 (XFtype, XFtype, XFtype, XFtype); extern XCtype __mulxc3 (XFtype, XFtype, XFtype, XFtype);
#endif #endif
#ifdef HAVE_TFMODE #if LIBGCC2_HAS_TF_MODE
extern DWtype __fixunstfDI (TFtype); extern DWtype __fixunstfDI (TFtype);
extern DWtype __fixtfdi (TFtype); extern DWtype __fixtfdi (TFtype);
extern TFtype __floatditf (DWtype); extern TFtype __floatditf (DWtype);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment