+2014-09-12 Joseph Myers <joseph@codesourcery.com>
+
+ * target.def (libgcc_floating_mode_supported_p): New hook.
+ * targhooks.c (default_libgcc_floating_mode_supported_p): New
+ function.
+ * targhooks.h (default_libgcc_floating_mode_supported_p): Declare.
+ * doc/tm.texi.in (LIBGCC2_HAS_DF_MODE, LIBGCC2_HAS_XF_MODE)
+ (LIBGCC2_HAS_TF_MODE): Remove.
+ (TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P): New @hook.
+ * doc/tm.texi: Regenerate.
+ * genmodes.c (emit_insn_modes_h): Define HAVE_%smode for each
+ machine mode.
+ * system.h (LIBGCC2_HAS_SF_MODE, LIBGCC2_HAS_DF_MODE)
+ (LIBGCC2_HAS_XF_MODE, LIBGCC2_HAS_TF_MODE): Poison.
+ * config/i386/cygming.h (LIBGCC2_HAS_TF_MODE): Remove.
+ * config/i386/darwin.h (LIBGCC2_HAS_TF_MODE): Remove.
+ * config/i386/djgpp.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define.
+ * config/i386/dragonfly.h (LIBGCC2_HAS_TF_MODE): Remove.
+ * config/i386/freebsd.h (LIBGCC2_HAS_TF_MODE): Remove.
+ * config/i386/gnu-user-common.h (LIBGCC2_HAS_TF_MODE): Remove.
+ * config/i386/i386-interix.h (IX86_NO_LIBGCC_TFMODE): Define.
+ * config/i386/i386.c (ix86_libgcc_floating_mode_supported_p): New
+ function.
+ (TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P): Define.
+ * config/i386/i386elf.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define.
+ * config/i386/lynx.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define.
+ * config/i386/netbsd-elf.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define.
+ * config/i386/netbsd64.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define.
+ * config/i386/nto.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define.
+ * config/i386/openbsd.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define.
+ * config/i386/openbsdelf.h (LIBGCC2_HAS_TF_MODE): Remove.
+ * config/i386/rtemself.h (IX86_NO_LIBGCC_TFMODE): Define.
+ * config/i386/sol2.h (LIBGCC2_HAS_TF_MODE): Remove.
+ * config/i386/vx-common.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define.
+ * config/ia64/elf.h (IA64_NO_LIBGCC_TFMODE): Define.
+ * config/ia64/freebsd.h (IA64_NO_LIBGCC_TFMODE): Define.
+ * config/ia64/hpux.h (LIBGCC2_HAS_XF_MODE, LIBGCC2_HAS_TF_MODE):
+ Remove.
+ * config/ia64/ia64.c (TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P):
+ New macro.
+ (ia64_libgcc_floating_mode_supported_p): New function.
+ * config/ia64/linux.h (LIBGCC2_HAS_TF_MODE): Remove.
+ * config/ia64/vms.h (IA64_NO_LIBGCC_XFMODE)
+ (IA64_NO_LIBGCC_TFMODE): Define.
+ * config/msp430/msp430.h (LIBGCC2_HAS_DF_MODE): Remove.
+ * config/pdp11/pdp11.c (TARGET_SCALAR_MODE_SUPPORTED_P): New
+ macro.
+ (pdp11_scalar_mode_supported_p): New function.
+ * config/rl78/rl78.h (LIBGCC2_HAS_DF_MODE): Remove.
+ * config/rx/rx.h (LIBGCC2_HAS_DF_MODE): Remove.
2014-09-12 Richard Biener <rguenther@suse.de>
PR middle-end/63237
+2014-09-12 Joseph Myers <joseph@codesourcery.com>
+
+ * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
+ macros for floating-point modes.
+
2014-09-11 Marc Glisse <marc.glisse@inria.fr>
PR target/58757
sprintf (macro_name, "__LIBGCC_%s_MANT_DIG__", name);
builtin_define_with_int_value (macro_name,
REAL_MODE_FORMAT (mode)->p);
+ if (!targetm.scalar_mode_supported_p (mode)
+ || !targetm.libgcc_floating_mode_supported_p (mode))
+ continue;
+ macro_name = (char *) alloca (strlen (name)
+ + sizeof ("__LIBGCC_HAS__MODE__"));
+ sprintf (macro_name, "__LIBGCC_HAS_%s_MODE__", name);
+ cpp_define (pfile, macro_name);
}
/* For libgcc crtstuff.c and libgcc2.c. */
asm_output_aligned_bss ((FILE), (DECL), (NAME), (SIZE), (ALIGN))
/* Put all *tf routines in libgcc. */
-#undef LIBGCC2_HAS_TF_MODE
-#define LIBGCC2_HAS_TF_MODE 1
#define LIBGCC2_TF_CEXT q
/* Output function declarations at the end of the file. */
#define SHIFT_DOUBLE_OMITS_COUNT 0
/* Put all *tf routines in libgcc. */
-#undef LIBGCC2_HAS_TF_MODE
-#define LIBGCC2_HAS_TF_MODE 1
#define LIBGCC2_TF_CEXT q
#undef TARGET_ASM_FILE_END
/* Support for C++ templates. */
#undef MAKE_DECL_ONE_ONLY
#define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1)
+
+#define IX86_MAYBE_NO_LIBGCC_TFMODE
#define TARGET_96_ROUND_53_LONG_DOUBLE (!TARGET_64BIT)
/* Put all *tf routines in libgcc. */
-#undef LIBGCC2_HAS_TF_MODE
-#define LIBGCC2_HAS_TF_MODE 1
#define LIBGCC2_TF_CEXT q
/* Static stack checking is supported by means of probes. */
#define TARGET_96_ROUND_53_LONG_DOUBLE (!TARGET_64BIT)
/* Put all *tf routines in libgcc. */
-#undef LIBGCC2_HAS_TF_MODE
-#define LIBGCC2_HAS_TF_MODE 1
#define LIBGCC2_TF_CEXT q
/* Static stack checking is supported by means of probes. */
GNU_USER_TARGET_ENDFILE_SPEC
/* Put all *tf routines in libgcc. */
-#undef LIBGCC2_HAS_TF_MODE
-#define LIBGCC2_HAS_TF_MODE 1
#define LIBGCC2_TF_CEXT q
#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
#undef LIBGCC2_LONG_DOUBLE_TYPE_SIZE
#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64
+#define IX86_NO_LIBGCC_TFMODE
+
#undef TARGET_LIBC_HAS_FUNCTION
#define TARGET_LIBC_HAS_FUNCTION no_c99_libc_has_function
return false;
}
+/* Implement target hook libgcc_floating_mode_supported_p. */
+static bool
+ix86_libgcc_floating_mode_supported_p (enum machine_mode mode)
+{
+ switch (mode)
+ {
+ case SFmode:
+ case DFmode:
+ case XFmode:
+ return true;
+
+ case TFmode:
+#ifdef IX86_NO_LIBGCC_TFMODE
+ return false;
+#elif defined IX86_MAYBE_NO_LIBGCC_TFMODE
+ return TARGET_LONG_DOUBLE_128;
+#else
+ return true;
+#endif
+
+ default:
+ return false;
+ }
+}
+
/* Target hook for c_mode_for_suffix. */
static enum machine_mode
ix86_c_mode_for_suffix (char suffix)
#undef TARGET_VECTOR_MODE_SUPPORTED_P
#define TARGET_VECTOR_MODE_SUPPORTED_P ix86_vector_mode_supported_p
+#undef TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P
+#define TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P \
+ ix86_libgcc_floating_mode_supported_p
+
#undef TARGET_C_MODE_FOR_SUFFIX
#define TARGET_C_MODE_FOR_SUFFIX ix86_c_mode_for_suffix
#undef ASM_OUTPUT_ALIGNED_BSS
#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
+
+#define IX86_MAYBE_NO_LIBGCC_TFMODE
TLS is detected by configure. We undefine it here. */
#undef HAVE_AS_TLS
+
+#define IX86_MAYBE_NO_LIBGCC_TFMODE
#define DEFAULT_PCC_STRUCT_RETURN 1
#define HAVE_ENABLE_EXECUTE_STACK
+
+#define IX86_MAYBE_NO_LIBGCC_TFMODE
}
#define HAVE_ENABLE_EXECUTE_STACK
+
+#define IX86_MAYBE_NO_LIBGCC_TFMODE
#define TARGET_POSIX_IO
#undef DBX_REGISTER_NUMBER
+
+#define IX86_MAYBE_NO_LIBGCC_TFMODE
#undef ASM_QUAD
#define TARGET_HAVE_NAMED_SECTIONS false
+
+#define IX86_MAYBE_NO_LIBGCC_TFMODE
#define HAVE_ENABLE_EXECUTE_STACK
/* Put all *tf routines in libgcc. */
-#undef LIBGCC2_HAS_TF_MODE
-#define LIBGCC2_HAS_TF_MODE 1
#define LIBGCC2_TF_CEXT q
#else
#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 80
#endif
+
+#define IX86_NO_LIBGCC_TFMODE
#endif
/* Put all *tf routines in libgcc. */
-#undef LIBGCC2_HAS_TF_MODE
-#define LIBGCC2_HAS_TF_MODE 1
#define LIBGCC2_TF_CEXT q
#undef DBX_REGISTER_NUMBER
#define DBX_REGISTER_NUMBER(n) svr4_dbx_register_map[n]
+
+#define IX86_MAYBE_NO_LIBGCC_TFMODE
%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}}\
crti.o%s crtbegin.o%s"
+#define IA64_NO_LIBGCC_TFMODE
+
/* End of elf.h */
#define TARGET_ELF 1
#define JMP_BUF_SIZE 76
+
+#define IA64_NO_LIBGCC_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
-
/* HP-UX headers are C++-compatible. */
#define NO_IMPLICIT_EXTERN_C
static tree ia64_gimplify_va_arg (tree, tree, gimple_seq *, gimple_seq *);
static bool ia64_scalar_mode_supported_p (enum machine_mode mode);
static bool ia64_vector_mode_supported_p (enum machine_mode mode);
+static bool ia64_libgcc_floating_mode_supported_p (enum machine_mode mode);
static bool ia64_legitimate_constant_p (enum machine_mode, rtx);
static bool ia64_legitimate_address_p (enum machine_mode, rtx, bool);
static bool ia64_cannot_force_const_mem (enum machine_mode, rtx);
#undef TARGET_VECTOR_MODE_SUPPORTED_P
#define TARGET_VECTOR_MODE_SUPPORTED_P ia64_vector_mode_supported_p
+#undef TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P
+#define TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P \
+ ia64_libgcc_floating_mode_supported_p
+
/* ia64 architecture manual 4.4.7: ... reads, writes, and flushes may occur
in an order different from the specified program order. */
#undef TARGET_RELAXED_ORDERING
}
}
+/* Implement TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P. */
+
+static bool
+ia64_libgcc_floating_mode_supported_p (enum machine_mode mode)
+{
+ switch (mode)
+ {
+ case SFmode:
+ case DFmode:
+ return true;
+
+ case XFmode:
+#ifdef IA64_NO_LIBGCC_XFMODE
+ return false;
+#else
+ return true;
+#endif
+
+ case TFmode:
+#ifdef IA64_NO_LIBGCC_TFMODE
+ return false;
+#else
+ return true;
+#endif
+
+ default:
+ return false;
+ }
+}
+
/* Implement the FUNCTION_PROFILER macro. */
void
#define LINK_EH_SPEC ""
/* Put all *tf routines in libgcc. */
-#undef LIBGCC2_HAS_TF_MODE
-#define LIBGCC2_HAS_TF_MODE 1
#undef LIBGCC2_TF_CEXT
#define LIBGCC2_TF_CEXT q
/* Default values for _CRTL_VER and _VMS_VER. */
#define VMS_DEFAULT_CRTL_VER 80300000
#define VMS_DEFAULT_VMS_VER 80300000
+
+#define IA64_NO_LIBGCC_XFMODE
+#define IA64_NO_LIBGCC_TFMODE
#define DOUBLE_TYPE_SIZE 64
#define LONG_DOUBLE_TYPE_SIZE 64 /*DOUBLE_TYPE_SIZE*/
-#define LIBGCC2_HAS_DF_MODE 1
#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64
#define DEFAULT_SIGNED_CHAR 0
enum machine_mode, const_tree, bool);
static void pdp11_conditional_register_usage (void);
static bool pdp11_legitimate_constant_p (enum machine_mode, rtx);
+
+static bool pdp11_scalar_mode_supported_p (enum machine_mode);
\f
/* Initialize the GCC target structure. */
#undef TARGET_ASM_BYTE_OP
#undef TARGET_LEGITIMATE_CONSTANT_P
#define TARGET_LEGITIMATE_CONSTANT_P pdp11_legitimate_constant_p
+
+#undef TARGET_SCALAR_MODE_SUPPORTED_P
+#define TARGET_SCALAR_MODE_SUPPORTED_P pdp11_scalar_mode_supported_p
\f
/* A helper function to determine if REGNO should be saved in the
current function's stack frame. */
return GET_CODE (x) != CONST_DOUBLE || legitimate_const_double_p (x);
}
+/* Implement TARGET_SCALAR_MODE_SUPPORTED_P. */
+
+static bool
+pdp11_scalar_mode_supported_p (enum machine_mode mode)
+{
+ /* Support SFmode even with -mfloat64. */
+ if (mode == SFmode)
+ return true;
+ return default_scalar_mode_supported_p (mode);
+}
+
struct gcc_target targetm = TARGET_INITIALIZER;
#define DOUBLE_TYPE_SIZE 32 /*64*/
#define LONG_DOUBLE_TYPE_SIZE 64 /*DOUBLE_TYPE_SIZE*/
-#define LIBGCC2_HAS_DF_MODE 1
#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64
#define DEFAULT_SIGNED_CHAR 0
#define LONG_DOUBLE_TYPE_SIZE DOUBLE_TYPE_SIZE
#ifdef __RX_32BIT_DOUBLES__
-#define LIBGCC2_HAS_DF_MODE 0
#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 32
#else
-#define LIBGCC2_HAS_DF_MODE 1
#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64
#endif
default is @code{LONG_DOUBLE_TYPE_SIZE}.
@end defmac
-@defmac LIBGCC2_HAS_DF_MODE
-Define this macro if neither @code{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{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 LIBGCC2_GNU_PREFIX
This macro corresponds to the @code{TARGET_LIBFUNC_GNU_PREFIX} target
hook and should be defined if that hook is overriden to be true. It
@code{int8x8x3_t}s in registers rather than forcing them onto the stack.
@end deftypefn
+@deftypefn {Target Hook} bool TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P (enum machine_mode @var{mode})
+Define this to return nonzero if libgcc provides support for the
+floating-point mode @var{mode}, which is known to pass
+@code{TARGET_SCALAR_MODE_SUPPORTED_P}. The default version of this
+hook returns true for all of @code{SFmode}, @code{DFmode},
+@code{XFmode} and @code{TFmode}, if such modes exist.
+@end deftypefn
+
@deftypefn {Target Hook} bool TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P (enum machine_mode @var{mode})
Define this to return nonzero for machine modes for which the port has
small register classes. If this target hook returns nonzero for a given
default is @code{LONG_DOUBLE_TYPE_SIZE}.
@end defmac
-@defmac LIBGCC2_HAS_DF_MODE
-Define this macro if neither @code{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{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 LIBGCC2_GNU_PREFIX
This macro corresponds to the @code{TARGET_LIBFUNC_GNU_PREFIX} target
hook and should be defined if that hook is overriden to be true. It
@hook TARGET_ARRAY_MODE_SUPPORTED_P
+@hook TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P
+
@hook TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P
@hook TARGET_FLAGS_REGNUM
+2014-09-12 Joseph Myers <joseph@codesourcery.com>
+
+ * trans-types.c (gfc_init_kinds): Check
+ targetm.libgcc_floating_mode_supported_p for floating-point
+ modes. Check HAVE_TFmode instead of LIBGCC2_HAS_TF_MODE.
+
2014-09-05 Joost VandeVondele <vondele@gcc.gnu.org>
PR fortran/62245
BOOL_TYPE_SIZE, BITS_PER_UNIT, POINTER_SIZE,
INT_TYPE_SIZE, CHAR_TYPE_SIZE, SHORT_TYPE_SIZE,
LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
- FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE,
- LONG_DOUBLE_TYPE_SIZE and LIBGCC2_HAS_TF_MODE. */
+ FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE and
+ LONG_DOUBLE_TYPE_SIZE. */
#include "tree.h"
#include "stor-layout.h"
#include "stringpool.h"
/* Only let float, double, long double and __float128 go through.
Runtime support for others is not provided, so they would be
useless. */
+ if (!targetm.libgcc_floating_mode_supported_p ((enum machine_mode)
+ mode))
+ continue;
if (mode != TYPE_MODE (float_type_node)
&& (mode != TYPE_MODE (double_type_node))
&& (mode != TYPE_MODE (long_double_type_node))
-#if defined(LIBGCC2_HAS_TF_MODE) && defined(ENABLE_LIBQUADMATH_SUPPORT)
+#if defined(HAVE_TFmode) && defined(ENABLE_LIBQUADMATH_SUPPORT)
&& (mode != TFmode)
#endif
)
int count_ = printf (" %smode,", m->name);
printf ("%*s/* %s:%d */\n", 27 - count_, "",
trim_filename (m->file), m->line);
+ printf ("#define HAVE_%smode\n", m->name);
}
puts (" MAX_MACHINE_MODE,\n");
CAN_DEBUG_WITHOUT_FP UNLIKELY_EXECUTED_TEXT_SECTION_NAME \
HOT_TEXT_SECTION_NAME LEGITIMATE_CONSTANT_P ALWAYS_STRIP_DOTDOT \
OUTPUT_ADDR_CONST_EXTRA SMALL_REGISTER_CLASSES ASM_OUTPUT_IDENT \
- ASM_BYTE_OP MEMBER_TYPE_FORCES_BLK
+ ASM_BYTE_OP MEMBER_TYPE_FORCES_BLK LIBGCC2_HAS_SF_MODE \
+ LIBGCC2_HAS_DF_MODE LIBGCC2_HAS_XF_MODE LIBGCC2_HAS_TF_MODE
/* Target macros only used for code built for the target, that have
moved to libgcc-tm.h or have never been present elsewhere. */
bool, (enum machine_mode mode, unsigned HOST_WIDE_INT nelems),
hook_bool_mode_uhwi_false)
+DEFHOOK
+(libgcc_floating_mode_supported_p,
+ "Define this to return nonzero if libgcc provides support for the \n\
+floating-point mode @var{mode}, which is known to pass \n\
+@code{TARGET_SCALAR_MODE_SUPPORTED_P}. The default version of this \n\
+hook returns true for all of @code{SFmode}, @code{DFmode}, \n\
+@code{XFmode} and @code{TFmode}, if such modes exist.",
+ bool, (enum machine_mode mode),
+ default_libgcc_floating_mode_supported_p)
+
/* Compute cost of moving data from a register of class FROM to one of
TO, using MODE. */
DEFHOOK
}
}
+/* Return true if libgcc supports floating-point mode MODE (known to
+ be supported as a scalar mode). */
+
+bool
+default_libgcc_floating_mode_supported_p (enum machine_mode mode)
+{
+ switch (mode)
+ {
+#ifdef HAVE_SFmode
+ case SFmode:
+#endif
+#ifdef HAVE_DFmode
+ case DFmode:
+#endif
+#ifdef HAVE_XFmode
+ case XFmode:
+#endif
+#ifdef HAVE_TFmode
+ case TFmode:
+#endif
+ return true;
+
+ default:
+ return false;
+ }
+}
+
/* Make some target macros useable by target-independent code. */
bool
targhook_words_big_endian (void)
extern tree default_mangle_assembler_name (const char *);
extern bool default_scalar_mode_supported_p (enum machine_mode);
+extern bool default_libgcc_floating_mode_supported_p (enum machine_mode);
extern bool targhook_words_big_endian (void);
extern bool targhook_float_words_big_endian (void);
extern bool default_float_exceptions_rounding_supported_p (void);
+2014-09-12 Joseph Myers <joseph@codesourcery.com>
+
+ * libgcc2.h (LIBGCC2_HAS_SF_MODE): Define using
+ __LIBGCC_HAS_SF_MODE__.
+ (LIBGCC2_HAS_DF_MODE): Define using __LIBGCC_HAS_DF_MODE__.
+ (LIBGCC2_HAS_XF_MODE): Define using __LIBGCC_HAS_XF_MODE__.
+ (LIBGCC2_HAS_TF_MODE): Define using __LIBGCC_HAS_TF_MODE__.
+ * config/libbid/bid_gcc_intrinsics.h
+ (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Do not define.
+ (LIBGCC2_HAS_XF_MODE): Define using __LIBGCC_HAS_XF_MODE__.
+ (LIBGCC2_HAS_TF_MODE): Define using __LIBGCC_HAS_TF_MODE__.
+ * fixed-bit.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Do not define.
+ (LIBGCC2_HAS_SF_MODE): Define using __LIBGCC_HAS_SF_MODE__.
+ (LIBGCC2_HAS_DF_MODE): Define using __LIBGCC_HAS_DF_MODE__.
+
2014-09-11 Georg-Johann Lay <avr@gjlay.de>
PR target/63223
#include "tm.h"
#include "libgcc_tm.h"
-#ifndef LIBGCC2_LONG_DOUBLE_TYPE_SIZE
-#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE LONG_DOUBLE_TYPE_SIZE
-#endif
-
-#ifndef LIBGCC2_HAS_XF_MODE
-#define LIBGCC2_HAS_XF_MODE \
- (BITS_PER_UNIT == 8 && LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 80)
+#ifdef __LIBGCC_HAS_XF_MODE__
+#define LIBGCC2_HAS_XF_MODE 1
+#else
+#define LIBGCC2_HAS_XF_MODE 0
#endif
-#ifndef LIBGCC2_HAS_TF_MODE
-#define LIBGCC2_HAS_TF_MODE \
- (BITS_PER_UNIT == 8 && LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 128)
+#ifdef __LIBGCC_HAS_TF_MODE__
+#define LIBGCC2_HAS_TF_MODE 1
+#else
+#define LIBGCC2_HAS_TF_MODE 0
#endif
#ifndef BID_HAS_XF_MODE
Ex: If we define FROM_QQ and TO_SI, the conversion from QQ to SI is
generated. */
-#ifndef LIBGCC2_LONG_DOUBLE_TYPE_SIZE
-#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE LONG_DOUBLE_TYPE_SIZE
-#endif
-
-#ifndef LIBGCC2_HAS_SF_MODE
-#define LIBGCC2_HAS_SF_MODE (BITS_PER_UNIT == 8)
+#ifdef __LIBGCC_HAS_SF_MODE__
+#define LIBGCC2_HAS_SF_MODE 1
+#else
+#define LIBGCC2_HAS_SF_MODE 0
#endif
-#ifndef LIBGCC2_HAS_DF_MODE
-#define LIBGCC2_HAS_DF_MODE \
- (BITS_PER_UNIT == 8 \
- && (__SIZEOF_DOUBLE__ * __CHAR_BIT__ == 64 \
- || LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 64))
+#ifdef __LIBGCC_HAS_DF_MODE__
+#define LIBGCC2_HAS_DF_MODE 1
+#else
+#define LIBGCC2_HAS_DF_MODE 0
#endif
typedef int QItype __attribute__ ((mode (QI)));
#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE LONG_DOUBLE_TYPE_SIZE
#endif
-#ifndef LIBGCC2_HAS_SF_MODE
-#define LIBGCC2_HAS_SF_MODE (BITS_PER_UNIT == 8)
+#ifdef __LIBGCC_HAS_SF_MODE__
+#define LIBGCC2_HAS_SF_MODE 1
+#else
+#define LIBGCC2_HAS_SF_MODE 0
#endif
-#ifndef LIBGCC2_HAS_DF_MODE
-#define LIBGCC2_HAS_DF_MODE \
- (BITS_PER_UNIT == 8 \
- && (__SIZEOF_DOUBLE__ * __CHAR_BIT__ == 64 \
- || LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 64))
+#ifdef __LIBGCC_HAS_DF_MODE__
+#define LIBGCC2_HAS_DF_MODE 1
+#else
+#define LIBGCC2_HAS_DF_MODE 0
#endif
-#ifndef LIBGCC2_HAS_XF_MODE
-#define LIBGCC2_HAS_XF_MODE \
- (BITS_PER_UNIT == 8 && LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 80)
+#ifdef __LIBGCC_HAS_XF_MODE__
+#define LIBGCC2_HAS_XF_MODE 1
+#else
+#define LIBGCC2_HAS_XF_MODE 0
#endif
-#ifndef LIBGCC2_HAS_TF_MODE
-#define LIBGCC2_HAS_TF_MODE \
- (BITS_PER_UNIT == 8 && LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 128)
+#ifdef __LIBGCC_HAS_TF_MODE__
+#define LIBGCC2_HAS_TF_MODE 1
+#else
+#define LIBGCC2_HAS_TF_MODE 0
#endif
#ifndef __LIBGCC_SF_MANT_DIG__