re PR debug/38367 (Wrong debug information for big endian function parameters)

PR debug/38367
	* function.c (assign_parm_find_stack_rtl): If promoted_mode
	is wider than DECL_MODE, adjust MEM_OFFSET (stack_parm) for
	big endian.

From-SVN: r142481
This commit is contained in:
Jakub Jelinek 2008-12-05 17:53:39 +01:00 committed by Jakub Jelinek
parent 1f21b6f4ad
commit 997f78fb1d
2 changed files with 16 additions and 1 deletions

View File

@ -1,5 +1,10 @@
2008-12-05 Jakub Jelinek <jakub@redhat.com>
PR debug/38367
* function.c (assign_parm_find_stack_rtl): If promoted_mode
is wider than DECL_MODE, adjust MEM_OFFSET (stack_parm) for
big endian.
PR middle-end/38338
* builtins.c (expand_builtin_apply_args): Put before parm_birth_insn
only if internal_arg_pointer is a non-virtual pseudo.

View File

@ -2336,7 +2336,17 @@ assign_parm_find_stack_rtl (tree parm, struct assign_parm_data_one *data)
while promoted mode's size is needed. */
if (data->promoted_mode != BLKmode
&& data->promoted_mode != DECL_MODE (parm))
set_mem_size (stack_parm, GEN_INT (GET_MODE_SIZE (data->promoted_mode)));
{
set_mem_size (stack_parm, GEN_INT (GET_MODE_SIZE (data->promoted_mode)));
if (MEM_EXPR (stack_parm) && MEM_OFFSET (stack_parm))
{
int offset = subreg_lowpart_offset (DECL_MODE (parm),
data->promoted_mode);
if (offset)
set_mem_offset (stack_parm,
plus_constant (MEM_OFFSET (stack_parm), -offset));
}
}
boundary = data->locate.boundary;
align = BITS_PER_UNIT;