diff options
author | Richard Henderson <rth@redhat.com> | 2011-08-04 08:39:40 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2011-08-04 08:39:40 -0700 |
commit | faf7a23d6d3bc281c386865971f7bffd8cb7057c (patch) | |
tree | 31c68b481009457f22ecf8ae103929ff23f553af /gcc/expr.c | |
parent | 0319cacc3928720fda058dc7e6c60f575169f576 (diff) | |
download | gcc-faf7a23d6d3bc281c386865971f7bffd8cb7057c.zip gcc-faf7a23d6d3bc281c386865971f7bffd8cb7057c.tar.gz gcc-faf7a23d6d3bc281c386865971f7bffd8cb7057c.tar.bz2 |
re PR middle-end/49968 (ICE in calls.c:3141 / assert after emit_stack_restore)
PR middle-end/49968
* calls.c (expand_call): Use fixup_args_size_notes for
emit_stack_restore.
* expr.c (fixup_args_size_notes): Allow STACK_POINTER_REGNUM sets
in non-standard modes.
From-SVN: r177404
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -3620,11 +3620,14 @@ fixup_args_size_notes (rtx prev, rtx last, int end_args_size) dest = SET_DEST (set); /* Look for direct modifications of the stack pointer. */ - if (dest == stack_pointer_rtx) + if (REG_P (dest) && REGNO (dest) == STACK_POINTER_REGNUM) { gcc_assert (!saw_unknown); /* Look for a trivial adjustment, otherwise assume nothing. */ - if (GET_CODE (SET_SRC (set)) == PLUS + /* Note that the SPU restore_stack_block pattern refers to + the stack pointer in V4SImode. Consider that non-trivial. */ + if (SCALAR_INT_MODE_P (GET_MODE (dest)) + && GET_CODE (SET_SRC (set)) == PLUS && XEXP (SET_SRC (set), 0) == stack_pointer_rtx && CONST_INT_P (XEXP (SET_SRC (set), 1))) this_delta = INTVAL (XEXP (SET_SRC (set), 1)); |