diff options
author | dje <dje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-12-24 02:22:37 +0000 |
---|---|---|
committer | dje <dje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-12-24 02:22:37 +0000 |
commit | a58dcf9da47de5eda13145b3fe0746bff2086d2a (patch) | |
tree | 87d1768140c9ea5855f3647e421b14c63deeae7d /gcc/function.c | |
parent | 8fc713c0e745553d45e123718b1ac9c039936348 (diff) | |
download | gcc-a58dcf9da47de5eda13145b3fe0746bff2086d2a.tar.gz |
* function.c (assign_parms): Update max_parm_reg and
parm_reg_stack_loc when adding new parm reg.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75001 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/function.c b/gcc/function.c index 6eb44aeec34..30ede39ef02 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -4740,9 +4740,28 @@ assign_parms (tree fndecl) if (REG_P (parmreg)) { + unsigned int regno = REGNO (parmreg); + emit_group_store (parmreg, entry_parm, TREE_TYPE (parm), int_size_in_bytes (TREE_TYPE (parm))); SET_DECL_RTL (parm, parmreg); + + if (regno >= max_parm_reg) + { + rtx *new; + int old_max_parm_reg = max_parm_reg; + + /* It's slow to expand this one register at a time, + but it's also rare and we need max_parm_reg to be + precisely correct. */ + max_parm_reg = regno + 1; + new = ggc_realloc (parm_reg_stack_loc, + max_parm_reg * sizeof (rtx)); + memset (new + old_max_parm_reg, 0, + (max_parm_reg - old_max_parm_reg) * sizeof (rtx)); + parm_reg_stack_loc = new; + parm_reg_stack_loc[regno] = stack_parm; + } } } |