diff options
author | Kyrylo Tkachov <ktkachov@gcc.gnu.org> | 2015-05-27 13:25:01 +0000 |
---|---|---|
committer | Kyrylo Tkachov <ktkachov@gcc.gnu.org> | 2015-05-27 13:25:01 +0000 |
commit | 99206968a8da4e5342b498f264eb365e11a499c8 (patch) | |
tree | 1f87b9fb46c70610a2b5ca644213e39984ef9d6a /gcc/expr.h | |
parent | 66371f94f55df849da15ffa9334868de99ac1f8c (diff) | |
download | gcc-99206968a8da4e5342b498f264eb365e11a499c8.zip gcc-99206968a8da4e5342b498f264eb365e11a499c8.tar.gz gcc-99206968a8da4e5342b498f264eb365e11a499c8.tar.bz2 |
[expr.c] PR target/65358 Avoid clobbering partial argument during sibcall
PR target/65358
* expr.c (memory_load_overlap): New function.
(emit_push_insn): When pushing partial args to the stack would
clobber the register part load the overlapping part into a pseudo
and put it into the hard reg after pushing. Change return type
to bool. Add bool argument.
* expr.h (emit_push_insn): Change return type to bool.
Add bool argument.
* calls.c (expand_call): Cancel sibcall optimization when encountering
partial argument on targets with ARGS_GROW_DOWNWARD and
!STACK_GROWS_DOWNWARD.
(emit_library_call_value_1): Update callsite of emit_push_insn.
(store_one_arg): Likewise.
PR target/65358
* gcc.dg/pr65358.c: New test.
From-SVN: r223753
Diffstat (limited to 'gcc/expr.h')
-rw-r--r-- | gcc/expr.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -219,8 +219,8 @@ extern rtx emit_move_resolve_push (machine_mode, rtx); extern rtx push_block (rtx, int, int); /* Generate code to push something onto the stack, given its mode and type. */ -extern void emit_push_insn (rtx, machine_mode, tree, rtx, unsigned int, - int, rtx, int, rtx, rtx, int, rtx); +extern bool emit_push_insn (rtx, machine_mode, tree, rtx, unsigned int, + int, rtx, int, rtx, rtx, int, rtx, bool); /* Expand an assignment that stores the value of FROM into TO. */ extern void expand_assignment (tree, tree, bool); |