aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/rx/rx.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/rx/rx.cc')
-rw-r--r--gcc/config/rx/rx.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/config/rx/rx.cc b/gcc/config/rx/rx.cc
index 9bf9d87..8048cc9 100644
--- a/gcc/config/rx/rx.cc
+++ b/gcc/config/rx/rx.cc
@@ -3648,6 +3648,18 @@ rx_modes_tieable_p (machine_mode mode1, machine_mode mode2)
== (GET_MODE_CLASS (mode2) == MODE_FLOAT
|| GET_MODE_CLASS (mode2) == MODE_COMPLEX_FLOAT));
}
+
+/* Implement TARGET_C_MODE_FOR_FLOATING_TYPE. Return SFmode or DFmode
+ for TI_{LONG_,}DOUBLE_TYPE which is for {long,} double type, go with
+ the default one for the others. */
+
+static machine_mode
+rx_c_mode_for_floating_type (enum tree_index ti)
+{
+ if (ti == TI_DOUBLE_TYPE || ti == TI_LONG_DOUBLE_TYPE)
+ return TARGET_64BIT_DOUBLES ? DFmode : SFmode;
+ return default_mode_for_floating_type (ti);
+}
#undef TARGET_NARROW_VOLATILE_BITFIELD
#define TARGET_NARROW_VOLATILE_BITFIELD rx_narrow_volatile_bitfield
@@ -3807,6 +3819,9 @@ rx_modes_tieable_p (machine_mode mode1, machine_mode mode2)
#undef TARGET_HAVE_SPECULATION_SAFE_VALUE
#define TARGET_HAVE_SPECULATION_SAFE_VALUE speculation_safe_value_not_needed
+#undef TARGET_C_MODE_FOR_FLOATING_TYPE
+#define TARGET_C_MODE_FOR_FLOATING_TYPE rx_c_mode_for_floating_type
+
struct gcc_target targetm = TARGET_INITIALIZER;
#include "gt-rx.h"