From: Jakub Jelinek Date: Thu, 29 Apr 2004 04:42:52 +0000 (+0200) Subject: sparc.h (FLOATDITF2_LIBCALL, [...]): Define. X-Git-Tag: releases/gcc-3.3.4~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aec0b4964679a554ed872fb616be1afb0cf91b2f;p=thirdparty%2Fgcc.git sparc.h (FLOATDITF2_LIBCALL, [...]): Define. 2004-04-29 Jakub Jelinek * config/sparc/sparc.h (FLOATDITF2_LIBCALL, FIX_TRUNCTFDI2_LIBCALL, FIXUNS_TRUNCTFDI2_LIBCALL): Define. (INIT_TARGET_OPTABS): If DITF_CONVERSION_LIBFUNCS, initialize DI <-> TF libfuncs for TARGET_ARCH32. (DITF_CONVERSION_LIBFUNCS): Define to 0. * config/sparc/linux.h (DITF_CONVERSION_LIBFUNCS): Redefine to 1. * config/sparc/linux64.h (DITF_CONVERSION_LIBFUNCS): Redefine to 1. * config.gcc (sparc-*-linux*): Revert 2004-03-25 change. * config/sparc/t-linux64 (TARGET_LIBGCC2_CFLAGS): Likewise. * config/sparc/t-linux: Removed. From-SVN: r81273 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d0d9931992d3..fec6686fab6e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,16 @@ +2004-04-29 Jakub Jelinek + + * config/sparc/sparc.h (FLOATDITF2_LIBCALL, FIX_TRUNCTFDI2_LIBCALL, + FIXUNS_TRUNCTFDI2_LIBCALL): Define. + (INIT_TARGET_OPTABS): If DITF_CONVERSION_LIBFUNCS, initialize + DI <-> TF libfuncs for TARGET_ARCH32. + (DITF_CONVERSION_LIBFUNCS): Define to 0. + * config/sparc/linux.h (DITF_CONVERSION_LIBFUNCS): Redefine to 1. + * config/sparc/linux64.h (DITF_CONVERSION_LIBFUNCS): Redefine to 1. + * config.gcc (sparc-*-linux*): Revert 2004-03-25 change. + * config/sparc/t-linux64 (TARGET_LIBGCC2_CFLAGS): Likewise. + * config/sparc/t-linux: Removed. + 2004-04-28 H.J. Lu PR target/15084 diff --git a/gcc/config.gcc b/gcc/config.gcc index 544daa469d64..7b242e9e759d 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -2439,7 +2439,7 @@ sparc-*-linux*libc1*) # SPARC's running GNU/Linux, libc5 ;; sparc-*-linux*) # SPARC's running GNU/Linux, libc6 tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/linux.h" - tmake_file="t-slibgcc-elf-ver t-linux sparc/t-linux sparc/t-crtfm" + tmake_file="t-slibgcc-elf-ver t-linux sparc/t-crtfm" ;; sparc-*-lynxos*) if test x$gas = xyes diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h index d9d5a8f8ba66..78ab2a9975cb 100644 --- a/gcc/config/sparc/linux.h +++ b/gcc/config/sparc/linux.h @@ -245,6 +245,9 @@ do { \ #define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64 #endif +#undef DITF_CONVERSION_LIBFUNCS +#define DITF_CONVERSION_LIBFUNCS 1 + #if !defined(USE_GNULIBC_1) && defined(HAVE_LD_EH_FRAME_HDR) #define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " #endif diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h index 9a3229265032..a3fee41bccf4 100644 --- a/gcc/config/sparc/linux64.h +++ b/gcc/config/sparc/linux64.h @@ -308,6 +308,9 @@ do { \ /* #define DWARF_OFFSET_SIZE PTR_SIZE */ +#undef DITF_CONVERSION_LIBFUNCS +#define DITF_CONVERSION_LIBFUNCS 1 + #if defined(HAVE_LD_EH_FRAME_HDR) #define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " #endif diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h index 5706349cbeea..30a7181b4e15 100644 --- a/gcc/config/sparc/sparc.h +++ b/gcc/config/sparc/sparc.h @@ -2586,10 +2586,18 @@ do { \ #define LTTF2_LIBCALL "_Q_flt" #define LETF2_LIBCALL "_Q_fle" +/* These functions were added in SCD 2.3, so not necessarily all targets + support them. */ +#define FLOATDITF2_LIBCALL "_Q_lltoq" +#define FIX_TRUNCTFDI2_LIBCALL "_Q_qtoll" +#define FIXUNS_TRUNCTFDI2_LIBCALL "_Q_qtoull" + +#define DITF_CONVERSION_LIBFUNCS 0 + /* Assume by default that the _Qp_* 64-bit libcalls are implemented such that the inputs are fully consumed before the output memory is clobbered. */ -#define TARGET_BUGGY_QP_LIB 0 +#define TARGET_BUGGY_QP_LIB 0 /* We can define the TFmode sqrt optab only if TARGET_FPU. This is because with soft-float, the SFmode and DFmode sqrt instructions will be absent, @@ -2623,6 +2631,13 @@ do { \ fixtfsi_libfunc = init_one_libfunc (FIX_TRUNCTFSI2_LIBCALL); \ fixunstfsi_libfunc \ = init_one_libfunc (FIXUNS_TRUNCTFSI2_LIBCALL); \ + if (DITF_CONVERSION_LIBFUNCS) \ + { \ + floatditf_libfunc = init_one_libfunc (FLOATDITF2_LIBCALL); \ + fixtfdi_libfunc = init_one_libfunc (FIX_TRUNCTFDI2_LIBCALL);\ + fixunstfdi_libfunc \ + = init_one_libfunc (FIXUNS_TRUNCTFDI2_LIBCALL); \ + } \ if (TARGET_FPU) \ sqrt_optab->handlers[(int) TFmode].libfunc \ = init_one_libfunc ("_Q_sqrt"); \ diff --git a/gcc/config/sparc/t-linux b/gcc/config/sparc/t-linux index 30a3ccaf83a5..e69de29bb2d1 100644 --- a/gcc/config/sparc/t-linux +++ b/gcc/config/sparc/t-linux @@ -1,2 +0,0 @@ -# Compile libgcc2.a with pic and IEEE quad long double. -TARGET_LIBGCC2_CFLAGS = -fPIC -mlong-double-128 diff --git a/gcc/config/sparc/t-linux64 b/gcc/config/sparc/t-linux64 index d21e149e4286..3e3fa4cae7e6 100644 --- a/gcc/config/sparc/t-linux64 +++ b/gcc/config/sparc/t-linux64 @@ -17,7 +17,3 @@ SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver \ CRTSTUFF_T_CFLAGS = `if test x$$($(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) \ -print-multi-os-directory) \ = x../lib64; then echo -mcmodel=medany; fi` - -# Compile libgcc2.a with pic and for -m32 also IEEE quad long double. -# -m64 implies -mlong-double-128, so this is no change for 64-bit. -TARGET_LIBGCC2_CFLAGS = -fPIC -mlong-double-128