diff options
author | Jan Hubicka <jh@suse.cz> | 2000-03-28 23:03:37 +0200 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2000-03-28 14:03:37 -0700 |
commit | 1e9d75e87b82126fc5249149e5e85f2f1f308eea (patch) | |
tree | d6b867a5f1ff4a5ed3b5ea9ff0b96e65058ce239 /gcc | |
parent | 8ba776817544782564c5bc710d6ddb2e3b32a0fd (diff) | |
download | gcc-1e9d75e87b82126fc5249149e5e85f2f1f308eea.zip gcc-1e9d75e87b82126fc5249149e5e85f2f1f308eea.tar.gz gcc-1e9d75e87b82126fc5249149e5e85f2f1f308eea.tar.bz2 |
sibcall.c (indentify_call_return_value): Find last call in the chain; Allow stack adjustment after function call.
* sibcall.c (indentify_call_return_value): Find last call in the chain;
Allow stack adjustment after function call.
From-SVN: r32791
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/sibcall.c | 11 |
2 files changed, 12 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 41f3741..abbdd6c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -25,6 +25,9 @@ Tue Mar 28 11:55:48 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> Tue Mar 28 08:29:46 2000 Jan Hubicka <jh@suse.cz> + * sibcall.c (indentify_call_return_value): Find last call in the chain; + Allow stack adjustment after function call. + * regmove.c (struct csa_memlist): Make mem field rtx *. (record_one_stack_ref): Accept rtx * instead of rtx as parameter. (try_apply_stack_adjustment): Replace whole MEM rtx. diff --git a/gcc/sibcall.c b/gcc/sibcall.c index 1a3a310..34cf5a9 100644 --- a/gcc/sibcall.c +++ b/gcc/sibcall.c @@ -53,10 +53,12 @@ identify_call_return_value (cp, p_hard_return, p_soft_return) { rtx insn, set, hard, soft; - /* Search forward through the "normal" call sequence to the CALL insn. */ insn = XEXP (cp, 0); - while (GET_CODE (insn) != CALL_INSN) + /* Search backward through the "normal" call sequence to the CALL insn. */ + while (NEXT_INSN (insn)) insn = NEXT_INSN (insn); + while (GET_CODE (insn) != CALL_INSN) + insn = PREV_INSN (insn); /* Assume the pattern is (set (dest) (call ...)), or that the first member of a parallel is. This is the hard return register used @@ -75,6 +77,11 @@ identify_call_return_value (cp, p_hard_return, p_soft_return) if (GET_CODE (hard) != REG) return 0; + /* Stack adjustment done after call may appear here. */ + insn = skip_stack_adjustment (insn); + if (! insn) + return 0; + /* If there's nothing after, there's no soft return value. */ insn = NEXT_INSN (insn); if (! insn) |