summaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2008-12-05 16:53:39 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2008-12-05 16:53:39 +0000
commit7aeb4db5145ab262f8a0f5a4bb9c9c83fe140eae (patch)
treeadf285d885bf031be16abb2cccbc626d5aca7ddf /gcc/function.c
parent0ef1a65121287b1ebc6c0afd0821e36980ca5eaa (diff)
downloadgcc-7aeb4db5145ab262f8a0f5a4bb9c9c83fe140eae.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142481 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 832079004f8..0320871f6a8 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -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;