+2004-04-29 Jakub Jelinek <jakub@redhat.com>
+
+ * 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 <hongjiu.lu@intel.com>
PR target/15084
;;
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
#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
/* #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
#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,
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"); \
-# Compile libgcc2.a with pic and IEEE quad long double.
-TARGET_LIBGCC2_CFLAGS = -fPIC -mlong-double-128
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