function.c (assign_parm_setup_reg): Handle misaligned stack arguments.
2019-08-15 Bernd Edlinger <bernd.edlinger@hotmail.de> * function.c (assign_parm_setup_reg): Handle misaligned stack arguments. From-SVN: r274531
This commit is contained in:
parent
bbedc1ae06
commit
8340324579
2 changed files with 22 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
2019-08-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
|
||||
|
||||
* function.c (assign_parm_setup_reg): Handle misaligned stack arguments.
|
||||
|
||||
2019-08-15 Martin Liska <mliska@suse.cz>
|
||||
|
||||
* tree-ssa-dce.c (propagate_necessity): We can't reach now
|
||||
|
|
|
@ -3127,6 +3127,7 @@ assign_parm_setup_reg (struct assign_parm_data_all *all, tree parm,
|
|||
int unsignedp = TYPE_UNSIGNED (TREE_TYPE (parm));
|
||||
bool did_conversion = false;
|
||||
bool need_conversion, moved;
|
||||
enum insn_code icode;
|
||||
rtx rtl;
|
||||
|
||||
/* Store the parm in a pseudoregister during the function, but we may
|
||||
|
@ -3188,7 +3189,6 @@ assign_parm_setup_reg (struct assign_parm_data_all *all, tree parm,
|
|||
conversion. We verify that this insn does not clobber any
|
||||
hard registers. */
|
||||
|
||||
enum insn_code icode;
|
||||
rtx op0, op1;
|
||||
|
||||
icode = can_extend_p (promoted_nominal_mode, data->passed_mode,
|
||||
|
@ -3291,6 +3291,23 @@ assign_parm_setup_reg (struct assign_parm_data_all *all, tree parm,
|
|||
|
||||
did_conversion = true;
|
||||
}
|
||||
else if (MEM_P (data->entry_parm)
|
||||
&& GET_MODE_ALIGNMENT (promoted_nominal_mode)
|
||||
> MEM_ALIGN (data->entry_parm)
|
||||
&& (((icode = optab_handler (movmisalign_optab,
|
||||
promoted_nominal_mode))
|
||||
!= CODE_FOR_nothing)
|
||||
|| targetm.slow_unaligned_access (promoted_nominal_mode,
|
||||
MEM_ALIGN (data->entry_parm))))
|
||||
{
|
||||
if (icode != CODE_FOR_nothing)
|
||||
emit_insn (GEN_FCN (icode) (parmreg, validated_mem));
|
||||
else
|
||||
rtl = parmreg = extract_bit_field (validated_mem,
|
||||
GET_MODE_BITSIZE (promoted_nominal_mode), 0,
|
||||
unsignedp, parmreg,
|
||||
promoted_nominal_mode, VOIDmode, false, NULL);
|
||||
}
|
||||
else
|
||||
emit_move_insn (parmreg, validated_mem);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue