diff options
Diffstat (limited to 'gcc/function.cc')
-rw-r--r-- | gcc/function.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/function.cc b/gcc/function.cc index 0c3e4ff..31256b5 100644 --- a/gcc/function.cc +++ b/gcc/function.cc @@ -3472,6 +3472,17 @@ assign_parm_setup_stack (struct assign_parm_data_all *all, tree parm, emit_move_insn (tempreg, validize_mem (copy_rtx (data->entry_parm))); + /* Some ABIs require scalar floating point modes to be passed + in a wider scalar integer mode. We need to explicitly + truncate to an integer mode of the correct precision before + using a SUBREG to reinterpret as a floating point value. */ + if (SCALAR_FLOAT_MODE_P (data->nominal_mode) + && SCALAR_INT_MODE_P (data->arg.mode) + && known_lt (GET_MODE_SIZE (data->nominal_mode), + GET_MODE_SIZE (data->arg.mode))) + tempreg = convert_wider_int_to_float (data->nominal_mode, + data->arg.mode, tempreg); + push_to_sequence2 (all->first_conversion_insn, all->last_conversion_insn); to_conversion = true; |