diff options
author | cchavva <cchavva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-12-28 01:51:55 +0000 |
---|---|---|
committer | cchavva <cchavva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-12-28 01:51:55 +0000 |
commit | 5cbb211bd65e6397bea94265f5240d42cd121657 (patch) | |
tree | 7bf4b9fa1674c595e43561ebd1c5af02c3875042 /gcc | |
parent | f4f04af530393e0a358162b5bf82ffb71bc8b936 (diff) | |
download | gcc-5cbb211bd65e6397bea94265f5240d42cd121657.tar.gz |
* calls.c (store_one_arg): If parm is passed both in stack and in
register and offset is greater than reg_parm_stack_space, split
the offset and call emit_push_insn().
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38503 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/calls.c | 24 |
2 files changed, 30 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d6b885817df..b315295d741 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2000-12-27 Chandrakala Chavva <cchavva@redhat.com> + + * calls.c (store_one_arg): If parm is passed both in stack and in + register and offset is greater than reg_parm_stack_space, split + the offset and call emit_push_insn(). + 2000-12-27 Nick Clifton <nickc@redhat.com> * ifcvt.c (noce_emit_store_flag): Handle jump insns that are diff --git a/gcc/calls.c b/gcc/calls.c index 9513c308507..51d5566d374 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -4535,6 +4535,30 @@ store_one_arg (arg, argblock, flags, variable_size, reg_parm_stack_space) } } + /* If parm is passed both in stack and in register and offset is + greater than reg_parm_stack_space, split the offset. */ + if (arg->reg && arg->pass_on_stack) + { + if (arg->offset.constant < reg_parm_stack_space && arg->offset.var) + error ("variable offset is passed paritially in stack and in reg"); + else if (arg->offset.constant < reg_parm_stack_space && arg->size.var) + error ("variable size is passed partially in stack and in reg"); + else if (arg->offset.constant < reg_parm_stack_space + && ((arg->offset.constant + arg->size.constant) + > reg_parm_stack_space)) + { + rtx size_rtx1 = GEN_INT (reg_parm_stack_space - arg->offset.constant); + emit_push_insn (arg->value, arg->mode, TREE_TYPE (pval), size_rtx1, + TYPE_ALIGN (TREE_TYPE (pval)) / BITS_PER_UNIT, + partial, reg, excess, argblock, + ARGS_SIZE_RTX (arg->offset), reg_parm_stack_space, + ARGS_SIZE_RTX (arg->alignment_pad)); + + size_rtx = GEN_INT (INTVAL(size_rtx) - reg_parm_stack_space); + } + } + + emit_push_insn (arg->value, arg->mode, TREE_TYPE (pval), size_rtx, TYPE_ALIGN (TREE_TYPE (pval)), partial, reg, excess, argblock, ARGS_SIZE_RTX (arg->offset), |