@@ -1707,6 +1707,9 @@ static const scoped_attribute_specs *const rs6000_attribute_table[] =
#undef TARGET_C_MODE_FOR_SUFFIX
#define TARGET_C_MODE_FOR_SUFFIX rs6000_c_mode_for_suffix
+#undef TARGET_C_MODE_FOR_FLOATING_TYPE
+#define TARGET_C_MODE_FOR_FLOATING_TYPE rs6000_c_mode_for_floating_type
+
#undef TARGET_INVALID_BINARY_OP
#define TARGET_INVALID_BINARY_OP rs6000_invalid_binary_op
@@ -24365,6 +24368,19 @@ rs6000_c_mode_for_suffix (char suffix)
return VOIDmode;
}
+/* Implement TARGET_C_MODE_FOR_FLOATING_TYPE. Return TFmode for
+ TI_LONG_DOUBLE_TYPE which is for long double type, go with the default
+ one for the others. */
+
+static machine_mode
+rs6000_c_mode_for_floating_type (enum tree_index ti)
+{
+ if (ti == TI_LONG_DOUBLE_TYPE)
+ return rs6000_long_double_type_size == FLOAT_PRECISION_TFmode ? TFmode
+ : DFmode;
+ return default_mode_for_floating_type (ti);
+}
+
/* Target hook for invalid_arg_for_unprototyped_fn. */
static const char *
invalid_arg_for_unprototyped_fn (const_tree typelist, const_tree funcdecl, const_tree val)
@@ -693,20 +693,6 @@ extern unsigned char rs6000_recip_bits[];
words. */
#define LONG_LONG_TYPE_SIZE 64
-/* A C expression for the size in bits of the type `float' on the
- target machine. If you don't define this, the default is one
- word. */
-#define FLOAT_TYPE_SIZE 32
-
-/* A C expression for the size in bits of the type `double' on the
- target machine. If you don't define this, the default is two
- words. */
-#define DOUBLE_TYPE_SIZE 64
-
-/* A C expression for the size in bits of the type `long double' on the target
- machine. If you don't define this, the default is two words. */
-#define LONG_DOUBLE_TYPE_SIZE rs6000_long_double_type_size
-
/* Work around rs6000_long_double_type_size dependency in ada/targtyps.cc. */
#define WIDEST_HARDWARE_FP_SIZE 64