diff options
Diffstat (limited to 'gcc/config/m68k/m68k.cc')
-rw-r--r-- | gcc/config/m68k/m68k.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/config/m68k/m68k.cc b/gcc/config/m68k/m68k.cc index b1c9238..79ba4d5 100644 --- a/gcc/config/m68k/m68k.cc +++ b/gcc/config/m68k/m68k.cc @@ -198,6 +198,7 @@ static machine_mode m68k_promote_function_mode (const_tree, machine_mode, int *, const_tree, int); static void m68k_asm_final_postscan_insn (FILE *, rtx_insn *insn, rtx [], int); static HARD_REG_SET m68k_zero_call_used_regs (HARD_REG_SET); +static machine_mode m68k_c_mode_for_floating_type (enum tree_index); /* Initialize the GCC target structure. */ @@ -365,6 +366,9 @@ static HARD_REG_SET m68k_zero_call_used_regs (HARD_REG_SET); #undef TARGET_ZERO_CALL_USED_REGS #define TARGET_ZERO_CALL_USED_REGS m68k_zero_call_used_regs +#undef TARGET_C_MODE_FOR_FLOATING_TYPE +#define TARGET_C_MODE_FOR_FLOATING_TYPE m68k_c_mode_for_floating_type + TARGET_GNU_ATTRIBUTES (m68k_attribute_table, { /* { name, min_len, max_len, decl_req, type_req, fn_type_req, @@ -7212,4 +7216,16 @@ m68k_zero_call_used_regs (HARD_REG_SET need_zeroed_hardregs) return need_zeroed_hardregs; } +/* Implement TARGET_C_MODE_FOR_FLOATING_TYPE. Return XFmode or DFmode + for TI_LONG_DOUBLE_TYPE which is for long double type, go with the + default one for the others. */ + +static machine_mode +m68k_c_mode_for_floating_type (enum tree_index ti) +{ + if (ti == TI_LONG_DOUBLE_TYPE) + return LONG_DOUBLE_TYPE_MODE; + return default_mode_for_floating_type (ti); +} + #include "gt-m68k.h" |