diff options
Diffstat (limited to 'gcc/config/m68k/m68k.c')
-rw-r--r-- | gcc/config/m68k/m68k.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c index f28955b..73b7637 100644 --- a/gcc/config/m68k/m68k.c +++ b/gcc/config/m68k/m68k.c @@ -188,6 +188,7 @@ static void m68k_init_sync_libfuncs (void) ATTRIBUTE_UNUSED; static enum flt_eval_method m68k_excess_precision (enum excess_precision_type); static bool m68k_hard_regno_mode_ok (unsigned int, machine_mode); +static bool m68k_modes_tieable_p (machine_mode, machine_mode); /* Initialize the GCC target structure. */ @@ -338,6 +339,9 @@ static bool m68k_hard_regno_mode_ok (unsigned int, machine_mode); #undef TARGET_HARD_REGNO_MODE_OK #define TARGET_HARD_REGNO_MODE_OK m68k_hard_regno_mode_ok +#undef TARGET_MODES_TIEABLE_P +#define TARGET_MODES_TIEABLE_P m68k_modes_tieable_p + static const struct attribute_spec m68k_attribute_table[] = { /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler, @@ -5204,6 +5208,18 @@ m68k_hard_regno_mode_ok (unsigned int regno, machine_mode mode) return false; } +/* Implement TARGET_MODES_TIEABLE_P. */ + +static bool +m68k_modes_tieable_p (machine_mode mode1, machine_mode mode2) +{ + return (!TARGET_HARD_FLOAT + || ((GET_MODE_CLASS (mode1) == MODE_FLOAT + || GET_MODE_CLASS (mode1) == MODE_COMPLEX_FLOAT) + == (GET_MODE_CLASS (mode2) == MODE_FLOAT + || GET_MODE_CLASS (mode2) == MODE_COMPLEX_FLOAT))); +} + /* Implement SECONDARY_RELOAD_CLASS. */ enum reg_class |